Deep Dive — DFS Search
“Scan every ping — the shark can’t hide forever.”
Challenge: The shark is hiding somewhere in a tree of sonar pings. Use Depth-First Search to scan the tree and find the shark fast.
Sonar Station • Tree Traversal
Task:
  1. Implement dfs_search(root) to perform a preorder depth-first traversal.
  2. Return a list of node values in the order visited.
  3. Click Run Unit Tests. If all tests pass, you'll get the flag.