Hacker News new | ask | show | jobs
by umvi 2091 days ago
Just get a clear whiteboard, draw the binary tree, then flip the whiteboard 180 around the vertical axis so you are now looking through the back of the whiteboard.
1 comments

Honestly, it's an O(1) solution depending on choice of data structure, possibly constant-factor more efficient through your program depending on language, and if you're programming on a whiteboard it might also arguably be the idiomatic way to do it in that context.

Limited in that you can only have one tree per whiteboard, though.