Round 1 ( phone Interview )
Onsite Interview (4 Rounds)
Round 1:
Q1) Reverse an integer
Q2) Given two linked lists which merge at point, find the common point at which they merge
Q3) Given the stock prices from morning to evening in an array, Find two points such that u get maximun profit.
( Hint: You have to make sure min lies left to the max value in the given array)
Round 2:
Round 3
Q1) Find the length of longest consecutive subsequence in a given array
[ 1 , 7, 8, 2, 3, 4, 5, 10, 6, 7, 8 ] ( answer is 2,3,4,5 with length 4 )
Q2) Print the elements at k disrance from leaf node in a binary tree.
Round 4:
Q1) Given rand(0,1) simulate rand(1,6)
Q2) [3,4,5,2,3,1,1,11] list pair that adds up to a given number.
I thought I did well. Missed on answering the Round 3 question 2 correctly.