Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear all DSA rounds, create sub issues for each pattern having sub-sub-issues of problems. #16

Open
Veercodeprog opened this issue Sep 13, 2024 · 0 comments

Comments

@Veercodeprog
Copy link
Owner

By mastering these 20 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 range queries
  • O(n) time complexity
  1. Backtracking
  • Recursive decision-making
  • Explore all possibilities
  • Pruning with constraints
@Veercodeprog Veercodeprog changed the title Clear all DSA rounds, Clear all DSA rounds, create sub issues for each pattern having sub-sub-issues of problems. Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant