Recently I interviewed at Google and Amazon for Software Engineering Intern. But was rejected by both in the final Interview Round.
Getting rejected by Amazon was convincing as I had no knowledge in the Networking field. So I was unable to answer questions regarding them. Also that was my first Interview ever.
But, It was a bit shocking for me to get rejected in the Google interview. I passed the first interview and got rejected in the second one. Both were phone screening rounds based on DS/Algorithms.
The interview went great I was able to provide multiple (five different) solutions to the answer and he asked me trade offs between solutions. There I stated something I read online and was not sure about why this happen. I stated "Its better to write a Iterative solution rather than a recursive one". He asked me why?..to which I had no clue. So I replied "I am not sure why this happenes but I had read it online and try to implementing solutions in iterative versions".
I don't think I was able to convinced him to that.
Is this the reason I was rejected in the Interview?...I have double checked my program it was correct. I stated the time/space complexities before writing the code. I can't seem to understand what to work on for future interviews.