graphs
AI, ML & GenAI interview questions tagged graphs, across every topic.
2 questions · 0 unlocked for you
Concepts behind "graphs"
The curriculum that explains the ideas these questions test.
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
Core
Union-Find (Disjoint Set Union)Union-Find (Disjoint Set Union) maintains a partition of elements into groups and answers 'are these two connected?' in near-constant amortized time via path compression and union by rank. Interviews test it because the naive alternative (re-running DFS or BFS per query) is too slow when merges repeat, and DSU is the right tool for dynamic connectivity, Kruskal's MST, and grouping problems where edges show up over time.💻 Coding & Engineering CraftSign in
