SwiftStack interview question

Recursion problems requiring BFS/DFS.