dfs
AI, ML & GenAI interview questions tagged dfs, across every topic.
9 questions · 0 unlocked for you
Concepts behind "dfs"
The curriculum that explains the ideas these questions test.
Core
Trees, BSTs, and TraversalA binary tree connects each node to at most two children, and a binary search tree adds the invariant that everything left is smaller and everything right is larger, which yields O(log n) search on a balanced tree. The traversal skills interviews check are the three depth-first orders (pre, in, post), breadth-first level order, and moving between recursion and an explicit stack. Applied-AI interviews test this because in-order traversal of a BST produces sorted output, and the recursion-to-stack conversion is the same skill behind iterative DFS everywhere.💻 Coding & Engineering CraftSign in
Core
Graphs: BFS, DFS, and Shortest PathsA graph is nodes and edges, and most of the work is realizing a problem is a graph to begin with. BFS finds shortest paths in unweighted graphs and explores level by level, DFS goes depth-first and reveals connectivity and cycles, and Dijkstra handles non-negative weighted shortest paths with a priority queue. Applied-AI interviews test it because dependency graphs, retrieval graphs, and reachability questions are everywhere once you learn to spot them.💻 Coding & Engineering CraftSign in
