Amazon Interview Question

Technical interval on depth first search