Microsoft Interview Question

General data structure problems.