I actually once had to build a tree from subtrees for work (I was modelling some kind of process as a tree, given pairs of data). It was good fun, and a break from the mundane CRUD-based work I usually do. I did it with a whiteboard initially, and ended up producing a fairly robust solution.
The difference was that I was able and to try various approaches out without pressure. I had access to my old algorithms textbook as a safety blanket. Some friends dropped by and we went out for supper, and I chewed over my ideas with them.
I also had two weeks to solve the problem, and even though it took one Friday night to solve the problem, being given 2 weeks to produce a working solution put me at ease.
Doing something like that in a high-stakes interview would be nearly impossible for me.
The difference was that I was able and to try various approaches out without pressure. I had access to my old algorithms textbook as a safety blanket. Some friends dropped by and we went out for supper, and I chewed over my ideas with them.
I also had two weeks to solve the problem, and even though it took one Friday night to solve the problem, being given 2 weeks to produce a working solution put me at ease.
Doing something like that in a high-stakes interview would be nearly impossible for me.