Skip to content

dilipkumar2k6/graph-algo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eulerian path/cycles

https://leetcode.com/problems/reconstruct-itinerary/

https://leetcode.com/problems/find-the-celebrity/

BFS/DFS on undirected graphs

https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/

https://leetcode.com/problems/friend-circles/ (Same problem as above but you're given an adjacency matrix: very similar to Zombie clusters problem in practice set 1)

https://leetcode.com/problems/graph-valid-tree/

https://leetcode.com/problems/is-graph-bipartite/

https://leetcode.com/problems/possible-bipartition/

(special case: Grids) https://leetcode.com/problems/number-of-islands/

https://leetcode.com/problems/max-area-of-island/

https://leetcode.com/problems/flood-fill/

https://leetcode.com/problems/word-break

Special BFS problems

https://leetcode.com/problems/pacific-atlantic-water-flow/

https://leetcode.com/problems/minesweeper/

https://leetcode.com/problems/sliding-puzzle/

https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/

https://leetcode.com/problems/shortest-path-to-get-all-keys/

https://leetcode.com/problems/sudoku-solver/

https://leetcode.com/problems/valid-sudoku/

https://leetcode.com/problems/01-matrix/

BFS on Directed graphs

https://leetcode.com/problems/snakes-and-ladders/

https://leetcode.com/problems/word-ladder/ (extra)

https://leetcode.com/problems/cut-off-trees-for-golf-event/

https://leetcode.com/problems/minimum-moves-to-move-a-box-to-their-target-location/

https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/

https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/

DFS on Directed graphs

https://leetcode.com/problems/course-schedule/

https://leetcode.com/problems/course-schedule-ii/

https://leetcode.com/problems/evaluate-division/

https://leetcode.com/problems/all-paths-from-source-lead-to-destination/

https://leetcode.com/problems/longest-increasing-path-in-a-matrix/

Tarjan's algo

https://leetcode.com/problems/critical-connections-in-a-network/

https://leetcode.com/problems/minimize-malware-spread/

https://leetcode.com/problems/minimize-malware-spread-ii/

https://leetcode.com/problems/minimum-number-of-days-to-disconnect-island/

Shortest path/ Bellman ford

https://leetcode.com/problems/network-delay-time/

https://leetcode.com/problems/cheapest-flights-within-k-stops/

https://leetcode.com/problems/get-watched-videos-by-your-friends/

https://leetcode.com/problems/path-with-maximum-probability/

Shortest path / Dijkastra

https://leetcode.com/problems/path-with-maximum-probability/

https://leetcode.com/problems/network-delay-time/

https://leetcode.com/problems/the-maze-ii/

https://leetcode.com/problems/the-maze-iii/

https://leetcode.com/problems/path-with-minimum-effort/

https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/

https://leetcode.com/problems/course-schedule-iii/

https://leetcode.com/problems/shortest-path-to-get-all-keys/

https://leetcode.com/problems/maximum-path-quality-of-a-graph/description/

Shortest Path Floyd-Warshall algorithm

https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/

https://leetcode.com/problems/course-schedule-iv/description/

All path

https://leetcode.com/problems/all-paths-from-source-to-target/description/

Minimum spanning tree

https://leetcode.com/problems/connecting-cities-with-minimum-cost/

https://leetcode.com/problems/optimize-water-distribution-in-a-village/

Topological sort using DFS

https://leetcode.com/problems/course-schedule

https://leetcode.com/problems/course-schedule-ii/

Topological sort using BFS

https://leetcode.com/problems/course-schedule

https://leetcode.com/problems/course-schedule-ii/

https://leetcode.com/problems/parallel-courses/

https://leetcode.com/problems/parallel-courses-ii/

Refer Refer https://sohojeprogramming.blogspot.com/2020/07/1494-parallel-courses-ii.html

Graph with Binary search

https://leetcode.com/problems/path-with-maximum-minimum-value/

Prim's algo

https://leetcode.com/problems/connecting-cities-with-minimum-cost/

https://leetcode.com/problems/optimize-water-distribution-in-a-village/

Releases

No releases published

Packages

No packages published