Amazon Interview Question

A coding challenge question on data structures.