Parity Interview Question

Data structures and algorithms coding on a whiteboard.