Graph Theory

162 LeetCode questions

Difficulty Distribution

Easy
3
2%
Medium
80
49%
Hard
79
49%

Top Companies

Questions

TitleDifficulty
Divide Nodes Into the Maximum Number of GroupsHard
Parallel Courses IIIHard
Number of ProvincesMedium
Number of Increasing Paths in a GridHard
Longest Increasing Path in a MatrixHard
Unit Conversion IMedium
Course ScheduleMedium
Count Ways to Build Rooms in an Ant ColonyHard
Reconstruct ItineraryHard
Find Diameter Endpoints of a TreeMedium
Design Excel Sum FormulaHard
Maximum Candies You Can Get from BoxesHard
Detonate the Maximum BombsMedium
Minimum Cost to Reach Destination in TimeHard
Alien DictionaryHard
Cheapest Flights Within K StopsMedium
Minimum Number of Vertices to Reach All NodesMedium
Maximum Star Sum of a GraphMedium
Number of Operations to Make Network ConnectedMedium
Network Delay TimeMedium
Critical Connections in a NetworkHard
Course Schedule IIMedium
Clone GraphMedium
Evaluate DivisionMedium
Find if Path Exists in GraphEasy
Find Center of Star GraphEasy
Minimum Cost to Buy Apples IIHard
Parallel Courses IIHard
Minimum Height TreesMedium
Min Cost to Connect All PointsMedium
Most Stones Removed with Same Row or ColumnMedium
Minimum Cost Path with Edge ReversalsMedium
Find Eventual Safe StatesMedium
All Paths From Source to TargetMedium
Satisfiability of Equality EquationsMedium
Redundant ConnectionMedium
Is Graph Bipartite?Medium
Minimum Cost to Convert String IMedium
Minimum Edge Reversals So Every Node Is ReachableHard
Possible BipartitionMedium
Find Closest Node to Given Two NodesMedium
Minimum Fuel Cost to Report to the CapitalMedium
Find All Possible Recipes from Given SuppliesMedium
Find the CelebrityMedium
Number of Connected Components in an Undirected GraphMedium
Keys and RoomsMedium
Reorder Routes to Make All Paths Lead to the City ZeroMedium
Find the Town JudgeEasy
Course Schedule IVMedium
Number of Ways to Arrive at DestinationMedium
Shortest Path with Alternating ColorsMedium
Count the Number of Complete ComponentsMedium
Loud and RichMedium
Minimum Cost to Convert String IIHard
Find the City With the Smallest Number of Neighbors at a Threshold DistanceMedium
Count Unreachable Pairs of Nodes in an Undirected GraphMedium
Tree DiameterMedium
Maximum Employees to Be Invited to a MeetingHard
Check for Contradictions in EquationsHard
Minimum Obstacle Removal to Reach CornerHard
All Ancestors of a Node in a Directed Acyclic GraphMedium
Minimum Cost to Make at Least One Valid Path in a GridHard
Most Profitable Path in a TreeMedium
Shortest Path Visiting All NodesHard
Connecting Cities With Minimum CostMedium
Minimum Degree of a Connected Trio in a GraphHard
Get Watched Videos by Your FriendsMedium
Minimum Time to Visit a Cell In a GridHard
Graph Valid TreeMedium
Parallel CoursesMedium
Longest Cycle in a GraphHard
Power Grid MaintenanceMedium
Sum of Distances in TreeHard
Find Critical and Pseudo-Critical Edges in Minimum Spanning TreeHard
Longest Path With Different Adjacent CharactersHard
Minimum Cost Walk in Weighted GraphHard
Path with Maximum ProbabilityMedium
Valid Arrangement of PairsHard
Jump Game VIIIMedium
Minimum Operations to Remove Adjacent Ones in MatrixHard
Count Pairs Of NodesHard
Minimum Score of a Path Between Two CitiesMedium
Find Minimum Time to Reach Last Room IIMedium
Minimize Malware SpreadHard
The Maze IIMedium
Sort Items by Groups Respecting DependenciesHard
Sequence ReconstructionMedium
Number of Good PathsHard
Minimum Time for K Connected ComponentsMedium
Shortest Distance After Road Addition Queries IMedium
Find All People With SecretHard
Maximize Spanning Tree Stability with UpgradesHard
Reachable Nodes In Subdivided GraphHard
The Time When the Network Becomes IdleMedium
Properties GraphMedium
Largest Color Value in a Directed GraphHard
Collect Coins in a TreeHard
Maximum Path Quality of a GraphHard
Optimize Water Distribution in a VillageHard
Minimize Maximum Component CostMedium

Showing 100 of 162 questions