Implement Depth-First Search Traversal | Cadence Interview Question