Graph Theory

130 LeetCode questions

Difficulty Distribution

Easy
3
2%
Medium
63
48%
Hard
64
49%

Top Companies

Questions

TitleDifficulty
Divide Nodes Into the Maximum Number of GroupsHard
Parallel Courses IIIHard
Course ScheduleMedium
Number of ProvincesMedium
Count Ways to Build Rooms in an Ant ColonyHard
Number of Increasing Paths in a GridHard
Longest Increasing Path in a MatrixHard
Unit Conversion IMedium
Maximum Candies You Can Get from BoxesHard
Minimum Number of Vertices to Reach All NodesMedium
Cheapest Flights Within K StopsMedium
Network Delay TimeMedium
Number of Operations to Make Network ConnectedMedium
Maximum Star Sum of a GraphMedium
Critical Connections in a NetworkHard
Clone GraphMedium
Course Schedule IIMedium
Minimum Height TreesMedium
Reconstruct ItineraryHard
Evaluate DivisionMedium
Redundant ConnectionMedium
Is Graph Bipartite?Medium
All Paths From Source to TargetMedium
Find Eventual Safe StatesMedium
Sum of Distances in TreeHard
Keys and RoomsMedium
Shortest Path Visiting All NodesHard
Loud and RichMedium
Cat and MouseHard
Most Stones Removed with Same Row or ColumnMedium
Find the Town JudgeEasy
Shortest Path with Alternating ColorsMedium
Path with Maximum ProbabilityMedium
Get Watched Videos by Your FriendsMedium
Find the City With the Smallest Number of Neighbors at a Threshold DistanceMedium
Reorder Routes to Make All Paths Lead to the City ZeroMedium
Find Critical and Pseudo-Critical Edges in Minimum Spanning TreeHard
Min Cost to Connect All PointsMedium
Minimum Degree of a Connected Trio in a GraphHard
Count Pairs Of NodesHard
Find Center of Star GraphEasy
Number of Ways to Arrive at DestinationMedium
Find if Path Exists in GraphEasy
Detonate the Maximum BombsMedium
Find All People With SecretHard
Find All Possible Recipes from Given SuppliesMedium
Maximum Employees to Be Invited to a MeetingHard
Longest Path With Different Adjacent CharactersHard
Maximum Total Importance of RoadsMedium
Count Unreachable Pairs of Nodes in an Undirected GraphMedium
Longest Cycle in a GraphHard
Count Visited Nodes in a Directed GraphHard
Minimum Cost Walk in Weighted GraphHard
Minimum Cost to Convert String IMedium
Count the Number of Complete ComponentsMedium
Minimum Cost to Convert String IIHard
Minimum Fuel Cost to Report to the CapitalMedium
Minimum Obstacle Removal to Reach CornerHard
All Ancestors of a Node in a Directed Acyclic GraphMedium
Minimum Time to Visit a Cell In a GridHard
Valid Arrangement of PairsHard
Minimum Cost to Make at Least One Valid Path in a GridHard
Most Profitable Path in a TreeMedium
Course Schedule IVMedium
Minimum Score of a Path Between Two CitiesMedium
Possible BipartitionMedium
Find Minimum Time to Reach Last Room IIMedium
Find Closest Node to Given Two NodesMedium
Minimum Cost to Reach Destination in TimeHard
Minimize Malware SpreadHard
Sort Items by Groups Respecting DependenciesHard
Number of Good PathsHard
Power Grid MaintenanceMedium
Strange Printer IIHard
Minimum Time for K Connected ComponentsMedium
Shortest Distance After Road Addition Queries IMedium
Minimum Cost Path with Edge ReversalsMedium
Reachable Nodes In Subdivided GraphHard
Minimum Edge Reversals So Every Node Is ReachableHard
Minimize Maximum Component CostMedium
Maximum Path Quality of a GraphHard
Number of Possible Sets of Closing BranchesHard
The Time When the Network Becomes IdleMedium
Flower Planting With No AdjacentMedium
Modify Graph Edge WeightsHard
Couples Holding HandsHard
Find a Safe Walk Through a GridMedium
Remove Methods From ProjectMedium
Find Minimum Time to Reach Last Room IMedium
Maximum Sum of Edge Values in a GraphHard
Collect Coins in a TreeHard
Rank Transform of a MatrixHard
Satisfiability of Equality EquationsMedium
Remove Max Number of Edges to Keep Graph Fully TraversableHard
Find Edges in Shortest PathsHard
Minimize Malware Spread IIHard
Maximum Partition FactorHard
Cracking the SafeHard
Parallel Courses IIHard
Cat and Mouse IIHard

Showing 100 of 130 questions