Skip to content

CodeByMateen/Lets-Code

Repository files navigation

Patterns

image

image

Patterns Guide

Clear all DSA rounds

By mastering these 22 DSA patterns

  1. Fast and Slow Pointer
  • Cycle detection method
  • O(1) space efficiency
  • Linked list problems
  1. Merge Intervals
  • Sort and merge
  • O(n log n) complexity
  • Overlapping interval handling
  1. Sliding Window
  • Fixed/variable window
  • O(n) time optimization
  • Subarray/substring problems
  1. Islands (Matrix Traversal)
  • DFS/BFS traversal
  • Connected component detection
  • 2D grid problems
  1. Two Pointers
  • Dual pointer strategy
  • Linear time complexity
  • Array/list problems
  1. Cyclic Sort
  • Sorting in cycles
  • O(n) time complexity
  • Constant space usage
  1. In-place Reversal of Linked List
  • Reverse without extra space
  • O(n) time efficiency
  • Pointer manipulation technique
  1. Breadth First Search
  • Level-by-level traversal
  • Uses queue structure
  • Shortest path problems
  1. Depth First Search
  • Recursive/backtracking approach
  • Uses stack (or recursion)
  • Tree/graph traversal
  1. Two Heaps
  • Max and min heaps
  • Median tracking efficiently
  • O(log n) insertions
  1. Subsets
  • Generate all subsets
  • Recursive or iterative
  • Backtracking or bitmasking
  1. Modified Binary Search
  • Search in variations
  • O(log n) time
  • Rotated/specialized arrays
  1. Bitwise XOR
  • Toggle bits operation
  • O(1) space complexity
  • Efficient for pairing
  1. Top 'K' elements
  • Use heap/quickselect
  • O(n log k) time
  • Efficient selection problem
  1. K-way Merge
  • Merge sorted lists
  • Min-heap based approach
  • O(n log k) complexity
  1. 0/1 Knapsack (Dynamic Programming)
  • Choose or skip items
  • O(n * W) complexity
  • Maximize value selection
  1. Unbounded Knapsack (Dynamic Programming)
  • Unlimited item choices
  • O(n * W) complexity
  • Multiple item selection
  1. Topological Sort (Graphs)
  • Directed acyclic graph
  • Order dependency resolution
  • Uses DFS or BFS
  1. Monotonic Stack
  • Maintain increasing/decreasing stack
  • Optimized for a range queries
  • O(n) time complexity
  1. Backtracking
  • Recursive decision-making
  • Explore all possibilities
  • Pruning with constraints
  1. Union Find
  • Track and merge connected components
  • Used for disjoint sets
  • Great for network connectivity
  1. Greedy Algorithm
  • Make locally optimal choices
  • Efficient for problems with optimal substructure
  • Covers tasks like activity selection, minimum coins

Practix-Programming-Sites

HackerRank Algorithms/Logic Practice (Recommended to do first) https://hackerrank.com/domains/algorithms

Anther good playlist: https://github.com/ombharatiya/FAANG-Coding-Interview-Questions?tab=readme-ov-file#amazon

Github link to algorithm challenges https://github.com/topics/algorithm-challenges

LeetCode Blind 75 https://leetcode.com/discuss/general-discussion/460599/blind-75-leetcode-questions

LeetCode Blind 75 Solution https://www.youtube.com/playlist?list=PLot-Xpze53ldVwtstag2TL4HQhAnC8ATf

Neet Code 150 https://neetcode.io/roadmap

LeetCode Top 150 https://leetcode.com/studyplan/top-interview-150/

CodeForces Problemset https://codeforces.com/problemset

NeetCode Problems Playlist https://www.youtube.com/@NeetCode/playlists

TheCodingWorld Playlist https://www.youtube.com/playlist?list=PLYAlGR1wWgUUyYZ3wX2GdnhiL-QVhAXfR

To Check Time Complexity of Program with Explanation https://www.timecomplexity.ai/

Fraz Playlist https://www.youtube.com/@mohammadfraz/playlists

Link to Hacker Rank https://www.hackerrank.com/domains/python https://www.hackerrank.com/domains/sql

Link to Hacker Earth https://www.hackerearth.com/for-developers/

Fraz DSA Sheet https://learnyard.com/practice/dsa

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages