3 TIMER SECTIONS :
2-Debug the code.(JAVA/C++/C /PYTHON ETC.)
3-2 medium coding questions
Started with friendly handshake and cliche question " Tell me about yourself something unique which is not mentioned in cv" .
All the coding questions were asked in 3 phases:
1-Data structure & Algo to be used
2- Writing explicit code & explaining complexity.
3-Again solving it with modifications & optimization.
Further solving if negative jumps are given.
Main focus was on algo used ie BFS
I told basic approach ie travelling in right direction & then storing the required level and doing Binary search.But use of gray code was required.Interviewer helped me to get to the soln.
Q4:Sort a nearly sorted (or K sorted) array.
Interviewer hinted to use searching algo.I got the point to use insertion sort.
Then he asked if i could use any data structure to optimize it .I used heap .
There wasn't any time pressure .If you don't get any idea of how to start , interviewer will give you suggestions.
Do a dry run on paper to explain your code.
He moved to cse fundamentals :
1- Deadlock(ps:os was not taught till then)
3-Asked for preference JAVA /C++
I said java .
4-Does JAVA support multiple inheritance?
He expected me to explain diamond problem with a clear example.
At last asked me if i had any questions for him.
This is a great opportunity to showcase your oratory skills.Ask about tech stack company uses,current projects ,domain of intern work which would be given.
1-Speak out your thinking process while looking for solution.Interviewer will steer your way to the soln while giving hints constantly.
2-Ask queries if question is not clear to you.
3- Write a neat code with apt variable names.
4- Be thorough with DS like trees & graphs,Algos like heap sort,bfs,dfs.
5-Reading AMAZON interview experiences on GFG is a must to crack the coding interviews.Primarily there is a huge questions resemblance.