Tip 1: Prepare DSA well.
Tip 2: Have a good knowledge of your resume.
Tip 1: Have a good knowledge of everything written in your resume.
Tip 2: Use a good template.
Three questions in 60 minutes at their office.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Used Linked list reversing algorithm itself.


DFS recursion.



If the string is: “abccba”, then the first repeated character is ‘c’, but the repeated character that is present first in the string is ‘a’. You need to print ‘a’.
Keep in mind that you need to print the repeated character that is present first in the string and not the first repeating character.
Use an array whose index denotes the position of character in alphabetical order.
Around the afternoon at their office.



A move may be from parent to child or from child to parent.
Given ‘ROOT’ = [2,-1,0,-1,-1]
The tree would look like this :

The answer would be 1, because the root node will transfer 1 coin to its right child. Thus both nodes have the same number of coins now.
DFS recursion in the post-order traversal. Each node must have one coin at the end, so pass the value of (current_number_of_coins - 1) to the parent node. At the parent node, calculate the moves required to satisfy the needs of the child nodes.



Input: n = 9, arr = [ 1, 2, 1, 2, 7, 2, 2, 3, 1 ], k = 3, m = 2
Output: 3.
Explanation: This is because on the 3rd day: all the roses with 'arr[i]' less than equal to 3 have already bloomed, this means every rose except the 5th rose has bloomed. Now we can form the first bouquet from the first three roses and the second bouquet from the last three roses.
The idea is that the seeding time is fixed and non-overlapping, meaning only one flower can be seeded at a time, and you need to wait before the next flower can be seeded. So, sort the flowers based on their growing time after seeding and plant them accordingly.
Late night.



Suppose, Ninja is stuck at node 62. The possible exit points in the maze are: 40, 10, and 20. From all the possible exit points the closest ones are 10 and 20 which are at a distance of 1 unit.
Was not able to solve this properly.



Just follow the DP approach used to solve the "robbing of houses" problem in a non-cyclic array: start from the first index, and then from the 0th index (but this time, go only up to the second-to-last element)

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the purpose of the return keyword?