Amazon Interview Question

Trees, graphs, and nested lists