Tip 1 : Practice all the data structures thoroughly and know about the basic concepts behind them and their use cases in real world.
Tip 2 : Be thorough with your resume .
Tip 3 : Be confident while answering the questions and be honest about your work.
Tip 1 : Keep your resume crisp and to the point.
Tip 2 : Have a thorough understanding of the technologies used in the project and why was that specific technology chosen.



Below is the example showing the input tree and its sum tree.




a) Duplicate elements may be present.
b) If no such element is present return -1.
Input: Given a sequence of five numbers 2, 4, 5, 6, 8.
Output: 6
Explanation:
In the given sequence of numbers, number 8 is the largest element, followed by number 6 which is the second-largest element. Hence we return number 6 which is the second-largest element in the sequence.
I traversed the array twice. In the first traversal, I found the maximum element. In the second traversal I found the greatest element less than the element obtained in the first traversal.



1. Every train will depart on the same day and the departure time will always be greater than the arrival time. For example, A train with arrival time 2240 and departure time 1930 is not possible.
2. Time will be given in 24H format and colons will be omitted for convenience. For example, 9:05AM will be given as "905", or 9:10PM will be given as "2110".
3. Also, there will be no leading zeroes in the given times. For example, 12:10AM will be given as “10” and not as “0010”.
I took a variable to count the number of platforms required at a particular time and a final ans variable. I took 2 arrays one for arrival time and the other for departure time and sorted both the arrays. Then I took 2 pointers at the start of each array and compared the timings pointed by the 2 variables. If the smallest time was of arrival I incremented my count variable otherwise decremented it and incremented the pointer of the smallest time. Every time I changed the count variable I compared it with my final ans variable, if its value is greater than my answer I updated my answer, and finally returned my answer variable.

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