Tip 1 : Focus primarily on DSA. Do daily practice on Codestudio/Leetcode/GFG and give contests.
Tip 2 : Build at least one end to end project which showcases your expertise in that domain. Provide the application/GitHub link that you have built in your resume
Tip 1 : Strictly keep a single page resume.
Tip 2 : Include only necessary information in the resume like education, skills, projects, papers, Links to coding platforms.
Tip 3 : Highlight those skills which are relevant for the role you are applying.
First round was a coding round held on CoCubes platform. There are 3 coding questions to be solved in 90 minutes. One can expect questions from Graph, DP, and Backtracking. No STL was allowed. I was able to solve all the three questions but the final result of test cases was not shown to the user. So to be on the safer side always write the optimized code if you have enough time remaining. Those who solved 2 questions also advanced to the next round.



For the given 5 intervals - [1, 4], [3, 5], [6, 8], [10, 12], [8, 9].
Since intervals [1, 4] and [3, 5] overlap with each other, we will merge them into a single interval as [1, 5].
Similarly, [6, 8] and [8, 9] overlap, merge them into [6,9].
Interval [10, 12] does not overlap with any interval.
Final List after merging overlapping intervals: [1, 5], [6, 9], [10, 12].
This is a fairly easy problem. The approach is to sort the given array of intervals and insert the first interval to our answer. Now we check whether the adjacent intervals overlap or not. If they do not overlap we add them to our answer. If they do overlap we merge it to the last interval we added to our answer. Since the constraints were small and STL was not allowed I applied bubble sort.




Consider the above binary tree. If ‘K’ is 15 then the required paths are [5, 6, 4] and [5, 15, -5].
1) Keep storing the values of nodes while doing the preorder traversal,
2) If we are at particular node ,lets say "x" then we must have the sum of all the nodes in root to x path,
3) We will keep track of current sum also
4) Whenever we reach left Node , we will check whether the current Sum == target Sum,if yes then we can push one Path to the answer.



1. A ‘path’ is a sequence of adjacent pair nodes with an edge between them in the binary tree.
2. The ‘path’ doesn’t need to pass through the root.
3. The ‘path sum’ is the sum of the node’s data in that path.
The idea is to update node values with the biggest, positive cumulative sum gathered by its children:
- If both contributions are negative, no value is added.
- If both are positive, only the biggest one is added, so that we don't include both children during the rest of the tree exploration.
- Leaves return its own value and we recursively work our way upwards.
- A global maximum sum variable is maintained so that every path can be individually checked, while updated node values on the tree allow for exploration of other valid paths outside of the current subtree.
Second round was conducted on Samsung Knox Meeting. After the introductions I came to know that my interviewer was from Cloud Domain so I was expecting questions from Cloud technology. Interview began with coding question involving Trie which I was able to solve. Second question was based on Disjoint Set. Lastly he asked about my projects and since I had certification in AWS he also asked about AWS services like Fargate, Serverless technology and some basic cloud related questions.



1) Trie(): Ninja has to initialize the object of this “TRIE” data structure.
2) insert(“WORD”): Ninja has to insert the string “WORD” into this “TRIE” data structure.
3) countWordsEqualTo(“WORD”): Ninja has to return how many times this “WORD” is present in this “TRIE”.
4) countWordsStartingWith(“PREFIX”): Ninjas have to return how many words are there in this “TRIE” that have the string “PREFIX” as a prefix.
5) erase(“WORD”): Ninja has to delete one occurrence of the string “WORD” from the “TRIE”.
1. If erase(“WORD”) function is called then it is guaranteed that the “WORD” is present in the “TRIE”.
2. If you are going to use variables with dynamic memory allocation then you need to release the memory associated with them at the end of your solution.
Step 1 : I started with brute force approach by using unordered_map. Operations like storing and erasing can be done in constant time however counting words with a given prefix resulted in O(n^2) time complexity. The interviewer was not happy with the approach and asked me to optimize it.
Step 2 : The optimized approach is to use Trie. I built class for implementing Trie as it looks cleaner and demonstrates your ability to write OOP code. Using Trie I maintained Nodes which have references to other Nodes. Every node of Trie consists of multiple branches. Each branch represents a possible character of keys. We need to mark the last node of every key as the end of the word node. A Trie node field say isEndOfWord is used to distinguish the node as the end of the word node. All the operations now can be done in O(Length of Longest word) which is constant time. I also discussed with interviewer the disadvantage of Trie which is that it takes a lot of memory of store all strings.



n = 4, roads = [ [1, 1, 1, 0],
[1, 1, 1, 0],
[1, 1, 1, 0],
[0, 0, 0, 1] ]

So, there are ‘2’ provinces.
1. A city is connected to itself. So, for every city ‘i’, ‘roads[i][i] = 1’.
This question can be solved using BFS, DFS and Disjoint Set Union. Again I wanted to demonstrate my OOP skills so I decided to go with DSU. I created a class for DSU and added Union and Find functions to it and initialized the class fields in the constructor. It is highly recommended to create classes as that's how you will be coding in the company as well. In DSU we maintain a set of nodes which are connected to each other. I used the Union function of DSU to connect the cities and Find function to calculate the parent of each city. Further I used Union by Rank and Path Compression to optimize my code. The number of provinces is same as the number of parents we have after the applying the Union operation for each edge
I had worked on AWS and deployed containers on AWS Fargate which is a serverless offering from AWS. Since he was from Cloud domain he asked me regarding basics of Docker and some questions on basis of cloud. Discussion revolved around scaling infrastructure, networking and monitoring the infrastructure (CloudWatch):
- What is Docker?
- What is Serverless?
- Difference between Containerization and Virtualization
- How to handle networking between containers?
- What is Saas, Iaas, Paas?
Tip 1 : Put only those skills in resume which you are familiar with. You will mostly likely be questioned on things which you have mentioned in your resume.
Tip 2 : Cloud Computing is a hot topic right now and having knowledge on it gives added advantage over other developers
HR Round was discussion on previous company work and technology I had worked on. I was asked about my preferences regarding which technology I would like to work on and finally there was salary discussion.
HR told me that after joining there would be Software Competency Advance Test to be conducted which needs to be cleared within probation period to get Full time Offer. Samsung usually conducts this test on site before joining for freshers but for experienced it is conducted during probation period.
Samsung SWC Advance Test conducted on Samsung's internal platform.

. * .
* * *
* . *
* * *
* * *
* * *
* * *
. * .
* * *
* * *
* . *
* * *
* . *
* . *
* * *
It is guaranteed that no two constellations are overlapping.
This problem can be solved using BFS. Using BFS calculate the closest constellation among all the constellations for a given point and add that point in the constellation. However out of 50 testcases only 35 were passing and for the rest it was giving TLE. Optimized approach was to to use DSU to form sets for constellations and add a point to another constellation if it is at a lower distance. 50/50 test cases passed.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?