Wayfair interview question

A Eulerian Tour-based question on Tree/Graph