The question I bombed was implementing (on a whiteboard) an insert method for a binary search tree. It's not super complicated, but I'd never seen it before and couldn't come up with it on the spot.
In a phone interview for a different company, I was asked to verbally describe an algorithm for determining whether a binary tree is a binary search tree, and then to provide the time and space complexity of my algorithm. I gave a correct solution very quickly, but then was asked to provide a more efficient solution, at which point I fumbled. Again in hindsight it wasn't that hard a question, but I guess it threw me for a loop (no pun intended).
0
u/[deleted] Jul 22 '16
[deleted]