Tip 1 : Participate in live contests and upsolve the problems which you couldn't solve during contest
Tip 2 : Focus on understanding all the Data structures and algorithms in deep
Tip 3 : Revise all DSA concepts in regular basis
Tip 1: Maintain 1 page resume, with all the necessary hyper links at appropriate places
Tip 2: Mention only those projects which you have done in real
In this round, i am given with 3 coding questions primarily on problem solving using DS Algo. The duration given is of 90 minutes. This round happened in CoCubes platform. Coming to the difficulty of the problems, first two questions are of “leetcode medium” difficulty, but the 3rd problem is of “leetcode hard” difficulty (Easier ones of “leetcode hard”). I managed to solve 2 questions completely and in the 3rd question some testcases ended up at time limit exceeded.
The topics are on:
1. Dynamic programming
2. Linkedlist
3. Graph



1234 is represented as (1 -> 2 -> 3 -> 4) and adding 1 to it should change it to (1 -> 2 -> 3 -> 5).
The input Linked list does not have any trailing zeros.
Its an adhoc problem



1. The grid has 0-based indexing.
2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
I tried it using Dijkstra, but still some testcases ended up with TLE.
In this round, am given with 1 coding question. The duration given is of 3 hours. For this round the candidate need to join in one meeting through our mobile where one person from the samsung internal hiring committee will view for the entire duration of the exam. We should not carry book with us, rather we should take one or two A4 sheets to do rough work in case needed. Before starting the exam itself, the person joined in the meeting asked to show my entire room and my table. After he confirmed that no one is present in the room then we proceeded further. This coding test is named as “Samsung Advanced test”.
The topic on which the problem given is “Binary search”. The difficulty can be categorized as “leetcode hard” (easier ones of leetcode hard).



Can you solve each query in O(logN) ?
Binary search on answer.
In this round, am given with 1 coding question. The duration given is of 4 hours. For this round as well the setup is same as previous round, where i need to join in meeting via mobile. This coding test is named as “Samsung Professional coding test”.
The topic on which the problem given is “Recursion and Backtracking”. The difficulty can be categorized as “Leetcode Hard”(harder ones of leetcode hard)



Solved it step by step, by adding the necessary checks that are specified in the question
The interview started with introduction of interviewer followed by mine, later he asked about my projects (Not too deep, just on the details about it, what algos were used and my role in the project). Then he shifted to main part i.e DS algo part, where he asked one Algorithmic problem, for which i came up with one approach within 2 minutes (As its not too hard one). Then i explained that approach to him, for which he agreed but he asked to further optimize. After about 3 minutes i gave him the final optimized approach for which he satisfied to the fullest and asked me to code it (We are given freedom to choose whichever language we like). I coded it in C++. After that, he asked the 2nd question. This question is based on trie. The question is of “leetcode medium” difficulty. After about 4 minutes, i told my approach to him for which he is quite satisfied. But he didn’t asked me to code as it’s going to be lengthy. Rather he asked one follow up question, which can be categorized as “leetcode hard”. After struggling for about 3 minutes, i came up with another approach for which he agreed. Actually he is quite impressed with my DSA skills and said “i am satisfied with your DSA skills, very good”.
Then he moved on to CS fundamentals, where he asked questions from Operating system, DBMS, CN, OOPS. For which i answered most of the questions except some from CN. I replied “i don’t have much idea on it, i’ll read about it later”. Then he said “no issues, its totally fine”. Then he asked whether i know anything about system design, for which obviously i said i don’t have any idea on that. Finally the interviewer said he is done from his side and asked whether i had any queries regarding anything. I asked a couple of questions about the work culture, kind of work which we get and all. Finally the interview ended on positive note.



1. The heights of the buildings are positive.
2. Santa starts from the cell (0, 0) and he has to reach the building (N - 1, M - 1).
3. Santa cannot leave the grid at any point of time.
Can be solved using intutive thinking



insert(word) - To insert a string "word" in Trie
search(word) - To check if string "word" is present in Trie or not.
startsWith(word) - To check if there is any string in the Trie that starts with the given prefix string "word".
Type 1: To insert a string "word" in Trie.
1 word
Type 2: To check if the string "word" is present in Trie or not.
2 word
Type 3: To check if there is any string in the Trie that starts with the given prefix string "word".
3 word
I solved it using trie and some adhoc checks
Questions on Critical section, bankers algo
The interview started with introduction. Then she asked some common HR questions. Then she asked about my internship experience and about my projects. Then she asked about my availability (Notice period), how soon can i join. Then she asked about my current compensation and expected compensation and noted it down. After some of my questions, she said that they’ll get back to me after some days.
why do you want to join samsung?
tell me one such situation where you feel like you’ve struggled a lot and achieved it.

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?