Tip 1 : Do Atleast 150 DSA Questions, I used to do striver's DSA Sheet.
Tip 2 : Do Atleast 2 Decent Projects
Tip 3 : Try to go as deep as possible in CS core subjects.
Tip 1 : Try put any prior internship experience if you have one, because they gave a lot weightage to that, I did summer internship in amazon which became my edge against all other candidates.
Tip 2 : Do Atleast 2 Decent Projects
Out of 600 Candidates only 58 were shortlisted after this 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].



For the given arr[ ] = { -1, 3, 5, 0, -2, -5 }
arr[ ] = {3, -1, 5, -2, 0, -5 } is valid rearrangement.
arr[ ] = {3, -1, 0, -2, 5, -5 } is invalid rearrangement; order of 0 and 5 is changed.
arr[ ] = {3, -1, 5, 0, -2, -5 } is invalid rearrangement; positive and negative elements are not alternative.
Make changes in the same array and no returning or printing is needed.
Consider zero(0) as a positive element for this question.
It is guaranteed that an answer always exists.
He asked me to write the structure of the Node class for the Linked List first. Then I gave him an iterative approach. He told me to code it. As I started writing the code, I thought recursive would be cleaner, I said the same to him, and he told me to code whatever approach I want. I coded the recursive implementation. Once I was done, I told him that the code is done, just let me dry run it once. He said, let us do it together, he gave me input, and I took him through every line of the code, what value was being stored in each variable after each line, I wrote all of this down in the comments, he was satisfied with it and moved on to the next question.


Consider the array [2,7,14] and the subset [2,7]. Here, we can multiply 2 with 4 and 7 with -1, and we can add the modified elements present in the subset to obtain 1. Hence, the answer is 1 in this case.

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?