Tip 1 : Use Geekforgeeks, interviewbit, leetcode
Tip 2 : Stay focused and regular
Tip 3 : Revise your concepts
Tip 1 : Short and crisp, do not add anything fake. prepare everything you mentioned in resume.
Tip 2 : Add good project
It has 2 coding questions and some behavioural questions.



1. Left - (i, j-1)
2. Right - (i, j+1)
3. Up - (i-1, j)
4. Down - (i+1, j)
solved using dijiksra single source all path algorithm to mind minimum cost.



If the given array is [1,2,3] then the answer would be 2. One of the ways to make all the elements of the given array equal is by adding 1 to the array element with value 1 and subtracting 1 from the array element with value 3. So that final array would become [2,2,2].
1.Multiply by 2, i.e., do m = 2 * m
2.Subtract 1, i.e., do m = m – 1
It was online face to face round



You are given ‘ARR’ = {1, 2, 2, 3, 3} and ‘K’ = 2.
The answer will {2, 3} as 2 and 3 are the elements occurring most times.
solved using hashmap
1.Create a Hashmap hm, to store key-value pair, i.e. element-frequency pair.
2.Traverse the array from start to end.
3.For every element in the array update hm[array[i]]++
4.Store the element-frequency pair in a vector and sort the vector in decreasing order of frequency.
5.Print the first k elements of sorted array.



1. Create an extra space dp, DP array to store the sub-problems.
2.Tackle some basic cases, if the length of the array is 0, print 0, if the length of the array is 1, print the first
. element, if the length of the array is 2, print maximum of two elements.
3. Update dp[0] as array[0] and dp[1] as maximum of array[0] and array[1]
4. Traverse the array from the second element (2nd index) to the end of array.
5. For every index, update dp[i] as maximum of dp[i-2] + array[i] and dp[i-1], this step defines the two 7.
cases, if an element is selected then the previous element cannot be selected and if an element is not selected then the previous element can be selected.
6. Print the value dp[n-1]
It was 2nd problem solving round


1) Cells with a value of 0 indicate empty space in the room.
2) Cells with a value of -1 indicate an obstacle in the room.
3) Cell with a value of 1 indicates the starting position of the robot.
4) Cell with a value of 2 indicates the ending position of the robot.
If ‘N’ = 3, ‘M’ = 3 and ‘ARR’ = [ [1, 0, 0], [0, 0, 0], [0, 0, 2] ]
Then the room is represented as:

The 2 unique paths are marked in the image above.
The first path is: (0, 0) -> (0, 1) -> (0, 2) -> (1, 2) -> (1, 1) -> (1, 0) -> (2, 0) -> (2, 1) -> (2, 2).
The second path is: (0, 0) -> (1, 0) -> (2, 0) -> (2, 1) -> (1, 1) -> (0, 1) -> (0, 2) -> (1, 2) -> (2, 2).
Used Bottom up DP
1. Create a 2D matrix of the same size as the given matrix to store the results.
2. Traverse through the created array row-wise and start filling the values in it.
3. If an obstacle is found, set the value to 0.
4. For the first row and column, set the value to 1 if an obstacle is not found.
5. Set the sum of the right and the upper values if an obstacle is not present at that corresponding position in the given matrix
6. Return the last value of the created 2d matrix




1. Create the copy of node 1 and insert it between node 1 & node 2 in the original Linked List, create a copy of 2 and insert it between 2 & 3. Continue in this fashion, add the copy of N after the Nth node
2. Now copy the random link in this fashion
3. This works because original->next is nothing but a copy of the original and Original->random->next is nothing but a copy of the random.
4. Now restore the original and copy linked lists in this fashion in a single loop.
5. Ensure that original->next is NULL and return the cloned list.
It was bar raiser round and only one coding question was asked along with some behavioural question



1. Delete a character
2. Replace a character with another one
3. Insert a character
Strings don't contain spaces in between.
1. first tried using recursion which was exponential in complexity
2. Optimized and Solved using 2d array and dynamic programming/ bottom up approach.

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?