> Yes you can memorize an answer here, and the implementation of a binary tree - I think most people just do that.
If you are talking about a self-balancing binary search tree, then, yeah, most people will have to memorize the implementation, as it would take much more than an hour to implement correctly. But if you are talking about plan binary trees, most good engineers will be able to write a simple enough implementation for the interview in a couple of minutes. And it won't be from memory, it will come from _understanding_ of how the binary tree is structured. The beauty here is that there is no need to memorize the implementation, as it is much easier to remember the definition of a tree and then write an implementation based on that.