This problem is taken from goproblems.com problem 2862.
/Solution
PathsSnapbackWorkshop
Sub-pagesSolution