Onsite Interview (4 轮)

第一轮:
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) 
第二轮:
 Behavioural Questions
 Q1) Find the common root directory for given two paths.
Example: /C:/ProgramFiles/root/File1.txt
/C:/ProgramFiles/File2.txt
Answer would be “/C:/ProgramFiles”
Q2) Build a Toll Booth System (Basically they are looking on how you build class programming)

第三轮
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 distance from leaf node in a binary tree. 
第四轮:
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.
第三轮第2题没答出来，挂了