Hammer Interview Question

Not too difficult, but binary tree algorithms