Alien Dictionary
Given a sorted dictionary of alien language, find the order of characters in the alien alphabet
All Paths From Source to Target
Find all possible paths from source node to target node in a directed acyclic graph (DAG)
Articulation Points (Cut Vertices)
Find all articulation points in an undirected graph - vertices whose removal increases the number of connected components
Bellman-Ford Algorithm
Find shortest paths from a source vertex to all other vertices in a weighted graph, capable of handling negative edge weights
BFS Shortest Path in Unweighted Graph (O(V+E))
Learn BFS shortest path in an unweighted graph: O(V+E) time, queue + parent[] for path reconstruction. Step-by-step for interviews—start now.
Breadth First Search (Shortest Reach)
Compute shortest distances from a start node in an undirected graph with uniform edge weight using BFS.
Breadth-First Search (BFS) Algorithm: Queue + O(V+E)
Learn BFS traversal with a FIFO queue + visited set. Includes BFS pseudocode, example, and O(V+E) complexity—practice for FAANG interviews.
Celebrity Problem
Find the celebrity in a party of n people using the minimum number of questions.
Clone Graph
Create a deep copy of an undirected graph represented with adjacency lists
Course Schedule
Determine if you can finish all courses given prerequisite relationships using topological sorting
Detect Cycle in Directed Graph
Determine if a directed graph contains a cycle
Detect Cycle in Undirected Graph (DFS/BFS, Union-Find)
Learn graph cycle detection in an undirected graph using DFS/BFS parent tracking or Union-Find (DSU). O(V+E). Step-by-step—practice now.
Find Bridges in a Graph
Find all bridges (critical edges) in an undirected graph using Tarjan's algorithm
Floyd-Warshall Algorithm - All Pairs Shortest Path
Find shortest paths between all pairs of vertices in a weighted graph using dynamic programming
Is Graph Bipartite
Check if a graph can be colored with exactly two colors such that no two adjacent nodes have the same color
Minimum Spanning Tree (MST): Kruskal vs Prim (DSU)
Learn what a minimum spanning tree is + MST algorithm steps. Kruskal (Union-Find) O(E log E) vs Prim (heap) O(E log V). Practice now.
Minimum Swaps to Sort Array
Find the minimum number of swaps required to sort an array.
Network Delay Time (Dijkstra's Algorithm)
Find the time it takes for a signal to reach all nodes in a network using shortest path algorithms
Number of Islands
Count the number of islands in a 2D grid
Strongly Connected Components
Find all strongly connected components in a directed graph
Topological Sort
Find a linear ordering of vertices in a directed acyclic graph
Word Ladder
Find the shortest transformation sequence from beginWord to endWord using single character changes