Nielsen Interview Question

Data structure algortihm medium to hard