Parity interview question

Data structures and algorithms coding on a whiteboard.