Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 870 Bytes

File metadata and controls

33 lines (20 loc) · 870 Bytes

DSA

Here is all the coding patterns you need to know, when to use them, what the benefit of the pattern is, a visual example, a code template to follow, and LeetCode questions you should solve to master the pattern.

Overview

  1. Sliding Window
  2. Two pointers
  3. Fast and Slow pointers
  4. Graph
  5. Monotonic Stack

Graph

Graph problems involve nodes and edges. They can be used to represent networks, relationships, and more. Understanding graph traversal algorithms and how to solve common graph problems is essential.

Problems Solved

  1. Directed Path (hasPath)
  2. Undirected Path (undirectedPath)
  3. Connected Components Count (connectedComponentsCount)
  4. Largest Component (largestComponent)
  5. Shortest Path (shortestPath)
  6. Island Count (islandCount)

Traversal Algorithms

  1. Depth-First Traversal (DFS)
  2. Breadth-First Traversal (BFS)