Tip 1 : Practice array,strings and recursion well.
Tip 2 : Have atleast 2 projects.
Tip 1 : Keep Resume clean.
Tip 2 : Mention only project/technologies that you are comfortable with.
MCQ round was from 10 to 11 .
Coding round was from 11 to 12:30


The attendees holding numbers from 1, 4, 3 are shown:

For the above example 1 -> 4 -> 3, 1 -> 3 -> 4 is the only correct answer, i.e nodes should be grouped sequentially. Hence, 3 -> 1 -> 4 is the wrong answer as we have to preserve the same order.
Iterate through the array
Used two arraylist to store odd and even separately
add odd and even back to array



There are n – 1 way for element 0
Let 0 be placed at index i. There are now two possibilities, depending on whether or not element i is placed at 0 in return.
i is placed at 0: This case is equivalent to solving the problem for n-2 elements as two elements have just swapped their positions.
i is not placed at 0: This case is equivalent to solving the problem for n-1 elements as now there are n-1 elements, n-1 positions and every element has n-2 choices
relation -count(n)=(n-1)*{count(n-1)+count(n-2)}



Let S = “abdd” and X = “bd”.
The windows in S which contain all the characters in X are: 'abdd', 'abd', 'bdd', 'bd'.
Out of these, the smallest substring in S which contains all the characters present in X is 'bd'.
All the other substring have a length larger than 'bd'.
First check if the length of the string is less than the length of the given pattern, if yes then “no such window can exist “.
Store the occurrence of characters of the given pattern in a hash_pat[].
we will be using two pointer technique basically
Start matching the characters of pattern with the characters of string i.e. increment count if a character matches.
Check if (count == length of pattern ) this means a window is found.
If such a window found, try to minimize it by removing extra characters from the beginning of the current window.
delete one character from first and again find this deleted key at right, once found apply step 5 .
Update min_length.
Print the minimum length window.
It was from 3pm to 3:30pm



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
brute force
For each element in the array, we find the maximum level of water it can trap after the rain, which is equal to the minimum of maximum height of bars on both the sides minus its own height
optimised
Find maximum height of bar from the left end upto an index i in the array left_max.
Find maximum height of bar from the right end upto an index i in the array right_max.
Iterate over the \text{height}height array and update ans
It was from 10 am
What was your jee rank
Why you use java
what are your strength and weakness
Why do you want to join nagarro
Tip 1 : Answer all questions confidently
Tip 2 : Research about company beforehand

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?