Coding tools
Learn & compete
Community
Practice
Recursive depth-first search.
Constraints
Example
>>> dfs({1:[2,3],2:[4],3:[],4:[]}, 1) [1, 2, 4, 3]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints