Improbable Interview Question

pretty standard algorithm and data structures questions