Sollicitatievraag bij Siemens Digital Industries Software

DFS and BFS algorithm question (leet code medium)