Amazon Interview Question

Datastructure, Reasoning and Coding