• Home
  • Learn
  • Feed
  • Ladder
  • Saved
← Roadmapsall graphs problems
🕸️

Graphs

Grid BFS/DFS, topo sort, shortest paths, connectivity.

6 stops · 190 problems0/94 on the path done
next ▸ Island PerimeterSilver · 1050
1

Grid islands

0/16 of 27you are here

Number of islands, area, flood fill, regions.

○Island Perimeter○Max Area of Island○Flood Fill○As Far From Land As Possible○Rotting Oranges○Number of Connected Components○Count Graph Components○Count Enclaves○01 Matrix○Count Closed Islands○Largest Component Size○Number of Islands○Walls and Gates○Number of Closed Islands○Surrounded Regions○01 Matrix Distances+11 in the arena
2

Topological sort

0/14

Course schedule, ordering, safe states.

○Course Schedule: Can Finish○Topological Sort (Smallest First)○Find Eventual Safe States○Course Schedule II: Order○Course Schedule○Course Schedule II○Find Eventual Safe Nodes○Reconstruct Itinerary○Alien Dictionary Order○Topological Order Smallest First○Minimum Height Trees○Kahn Topological Order○Alien Dictionary○Sort Items by Groups
3

Shortest paths

0/16 of 24

Dijkstra, Bellman-Ford, network delay.

○Dijkstra Shortest Distance○Dijkstra Shortest Distances○Minimum Genetic Mutation○Shortest Path in a Grid○Shortest Path (Unweighted)○Open The Lock○Shortest Path in Unweighted Graph○Network Delay Time○Shortest Path With Obstacle Elimination○Word Ladder Length○Jump Game IV○Snakes And Ladders○Shortest Path With Alternating Colors○Cheapest Flights Within K Stops○Bellman-Ford With Negative Edges○Number of Ways to Arrive at Destination+8 in the arena
4

Connectivity & union-find

0/16 of 17

Provinces, path exists, redundant edge.

○Find the Town Judge○Count Connected Components○Valid Path Exists○Number of Provinces○Find if Path Exists○Connected Components in a Graph○Keys and Rooms○Find if Path Exists in Graph○Graph Valid Tree○Path Exists Between Nodes○Redundant Connection○Accounts Merge Count○Count Complete Components○Coloring a Border○Count the Number of Complete Components○Count Complete Connected Components+1 in the arena
5

Bipartite & traversal

0/16 of 19

Bipartite checks, clone, all paths.

○Find Center of Star Graph○Count Reachable Nodes○Find the Celebrity○Clone Graph Node Count○Reachable Node Count○All Paths From Source to Target○Minimum Cost To Connect All Points○Reachable Within K Hops○Is Graph Bipartite○Minimum Spanning Tree Weight○Possible Bipartition○Find The City With Fewest Reachable○Is Graph Bipartite?○Source Eccentricity○Maximal Network Rank○Count Unreachable Pairs of Nodes+3 in the arena
6

More Graphs

0/16 of 89

Everything else in this category — keep climbing.

○Can Finish Courses○Count Modifiable Graph Edges○Count Battleships○The Maze: Can Reach Destination○Longest Path in a DAG○Nearest Exit From Maze Entrance○Parallel Courses: Min Semesters○Has Path Between Nodes○Minimum Time to Complete All Tasks○Minimum Knight Moves○Friend Circles Count○Valid Path in Graph○Time Needed to Inform Employees○Parallel Courses○Satisfiability of Equations○Count Leaf Nodes+73 in the arena
🏁Finish line