ezDI interview question

Puzzles and algorithms.