Skip to content

Soumyaranjan-Das/leetcode-dsa-all

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

leetcode-dsa-all

#TWO POINTERS

Two Sum II - Input Array Is Sorted → https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/

Remove Duplicates from Sorted Array → https://leetcode.com/problems/remove-duplicates-from-sorted-array/

Move Zeroes → https://leetcode.com/problems/move-zeroes/

Reverse String → https://leetcode.com/problems/reverse-string/

Squares of a Sorted Array → https://leetcode.com/problems/squares-of-a-sorted-array/

3Sum → https://leetcode.com/problems/3sum/

3Sum Closest → https://leetcode.com/problems/3sum-closest/

4Sum → https://leetcode.com/problems/4sum/

Sort Colors → https://leetcode.com/problems/sort-colors/

Minimum Size Subarray Sum → https://leetcode.com/problems/minimum-size-subarray-sum/

3Sum Smaller → https://leetcode.com/problems/3sum-smaller/

Subarray Product Less Than K → https://leetcode.com/problems/subarray-product-less-than-k/

Partition Labels → https://leetcode.com/problems/partition-labels/

Boats to Save People → https://leetcode.com/problems/boats-to-save-people/

Interval List Intersections → https://leetcode.com/problems/interval-list-intersections/

Substring with Concatenation of All Words → https://leetcode.com/problems/substring-with-concatenation-of-all-words/

Minimum Window Substring → https://leetcode.com/problems/minimum-window-substring/

Sliding Window Maximum → https://leetcode.com/problems/sliding-window-maximum/

Smallest Range Covering Elements from K Lists → https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/

Replace the Substring for Balanced String → https://leetcode.com/problems/replace-the-substring-for-balanced-string/


#SLIDING WINDOW

🔹 Easy (5)

Maximum Average Subarray I → https://leetcode.com/problems/maximum-average-subarray-i/

Contains Duplicate II → https://leetcode.com/problems/contains-duplicate-ii/

Longest Substring Without Repeating Characters → https://leetcode.com/problems/longest-substring-without-repeating-characters/

Minimum Size Subarray Sum → https://leetcode.com/problems/minimum-size-subarray-sum/

Reverse Vowels of a String → https://leetcode.com/problems/reverse-vowels-of-a-string/

🔹 Medium (10)

Permutation in String → https://leetcode.com/problems/permutation-in-string/

Find All Anagrams in a String → https://leetcode.com/problems/find-all-anagrams-in-a-string/

Subarray Product Less Than K → https://leetcode.com/problems/subarray-product-less-than-k/

Longest Substring with At Most K Distinct Characters → https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/

Longest Repeating Character Replacement → https://leetcode.com/problems/longest-repeating-character-replacement/

Fruit Into Baskets → https://leetcode.com/problems/fruit-into-baskets/

Max Consecutive Ones III → https://leetcode.com/problems/max-consecutive-ones-iii/

Grumpy Bookstore Owner → https://leetcode.com/problems/grumpy-bookstore-owner/

Count Number of Nice Subarrays → https://leetcode.com/problems/count-number-of-nice-subarrays/

Maximum Erasure Value → https://leetcode.com/problems/maximum-erasure-value/

🔹 Hard (5)

Minimum Window Substring → https://leetcode.com/problems/minimum-window-substring/

Sliding Window Maximum → https://leetcode.com/problems/sliding-window-maximum/

Subarrays with K Different Integers → https://leetcode.com/problems/subarrays-with-k-different-integers/

Longest Substring with At Least K Repeating Characters → https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/

Count Subarrays With Fixed Bounds → https://leetcode.com/problems/count-subarrays-with-fixed-bounds/


#PREFIX-SUM

🔹 Easy (5)

Running Sum of 1d Array → https://leetcode.com/problems/running-sum-of-1d-array/

Find Pivot Index → https://leetcode.com/problems/find-pivot-index/

Subarray Sum Equals K → https://leetcode.com/problems/subarray-sum-equals-k/

Range Sum Query - Immutable → https://leetcode.com/problems/range-sum-query-immutable/

Minimum Value to Get Positive Step by Step Sum → https://leetcode.com/problems/minimum-value-to-get-positive-step-by-step-sum/

🔹 Medium (10)

Range Sum Query - 2D Immutable → https://leetcode.com/problems/range-sum-query-2d-immutable/

Continuous Subarray Sum → https://leetcode.com/problems/continuous-subarray-sum/

Subarray Sums Divisible by K → https://leetcode.com/problems/subarray-sums-divisible-by-k/

Maximum Size Subarray Sum Equals k → https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/

Number of Subarrays with Bounded Maximum → https://leetcode.com/problems/number-of-subarrays-with-bounded-maximum/

Count Number of Nice Subarrays → https://leetcode.com/problems/count-number-of-nice-subarrays/

Find the Middle Index in Array → https://leetcode.com/problems/find-the-middle-index-in-array/

Ways to Make a Fair Array → https://leetcode.com/problems/ways-to-make-a-fair-array/

K Radius Subarray Averages → https://leetcode.com/problems/k-radius-subarray-averages/

Partition Array Into Three Parts With Equal Sum → https://leetcode.com/problems/partition-array-into-three-parts-with-equal-sum/

🔹 Hard (5)

Maximum Sum of Two Non-Overlapping Subarrays → https://leetcode.com/problems/maximum-sum-of-two-non-overlapping-subarrays/

Maximum Sum of Three Non-Overlapping Subarrays → https://leetcode.com/problems/maximum-sum-of-three-non-overlapping-subarrays/

Shortest Subarray with Sum at Least K → https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/

Stone Game VII → https://leetcode.com/problems/stone-game-vii/

Maximum Sum Circular Subarray → https://leetcode.com/problems/maximum-sum-circular-subarray/


#MERGE-INTERVALS

Merge Intervals → https://leetcode.com/problems/merge-intervals/

Insert Interval → https://leetcode.com/problems/insert-interval/

Non-overlapping Intervals → https://leetcode.com/problems/non-overlapping-intervals/

Meeting Rooms → https://leetcode.com/problems/meeting-rooms/

Meeting Rooms II → https://leetcode.com/problems/meeting-rooms-ii/

Interval List Intersections → https://leetcode.com/problems/interval-list-intersections/

Employee Free Time → https://leetcode.com/problems/employee-free-time/

Minimum Number of Arrows to Burst Balloons → https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/

Car Pooling → https://leetcode.com/problems/car-pooling/

My Calendar I → https://leetcode.com/problems/my-calendar-i/


#BINARY-SEARCH

🔹 Easy (5)

Binary Search → https://leetcode.com/problems/binary-search/

First Bad Version → https://leetcode.com/problems/first-bad-version/

Guess Number Higher or Lower → https://leetcode.com/problems/guess-number-higher-or-lower/

Valid Perfect Square → https://leetcode.com/problems/valid-perfect-square/

Sqrt(x) → https://leetcode.com/problems/sqrtx/

🔹 Medium (10)

Search in Rotated Sorted Array → https://leetcode.com/problems/search-in-rotated-sorted-array/

Search in Rotated Sorted Array II → https://leetcode.com/problems/search-in-rotated-sorted-array-ii/

Find First and Last Position of Element in Sorted Array → https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/

Search a 2D Matrix → https://leetcode.com/problems/search-a-2d-matrix/

Search a 2D Matrix II → https://leetcode.com/problems/search-a-2d-matrix-ii/

Peak Index in a Mountain Array → https://leetcode.com/problems/peak-index-in-a-mountain-array/

Find Peak Element → https://leetcode.com/problems/find-peak-element/

Find Minimum in Rotated Sorted Array → https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/

Find Minimum in Rotated Sorted Array II → https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/

Koko Eating Bananas → https://leetcode.com/problems/koko-eating-bananas/

🔹 Hard (5)

Median of Two Sorted Arrays → https://leetcode.com/problems/median-of-two-sorted-arrays/

Split Array Largest Sum → https://leetcode.com/problems/split-array-largest-sum/

Capacity To Ship Packages Within D Days → https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/

Aggressive Cows (LeetCode variant: Magnetic Force Between Two Balls) → https://leetcode.com/problems/magnetic-force-between-two-balls/

Minimize the Maximum Distance to Gas Station → https://leetcode.com/problems/minimize-max-distance-to-gas-station/


#SORTING

Sort Colors → https://leetcode.com/problems/sort-colors/

Largest Number → https://leetcode.com/problems/largest-number/

Merge Intervals → https://leetcode.com/problems/merge-intervals/

Meeting Rooms II → https://leetcode.com/problems/meeting-rooms-ii/

Minimum Number of Arrows to Burst Balloons → https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/

Non-overlapping Intervals → https://leetcode.com/problems/non-overlapping-intervals/

Reorder Data in Log Files → https://leetcode.com/problems/reorder-data-in-log-files/

H-Index → https://leetcode.com/problems/h-index/

Maximum Gap → https://leetcode.com/problems/maximum-gap/

Kth Largest Element in an Array → https://leetcode.com/problems/kth-largest-element-in-an-array/


FAST & SLOW POINTER

  1. Linked List Cycle - https://leetcode.com/problems/linked-list-cycle/
  2. Linked List Cycle II - https://leetcode.com/problems/linked-list-cycle-ii/
  3. Happy Number - https://leetcode.com/problems/happy-number/
  4. Middle of the Linked List - https://leetcode.com/problems/middle-of-the-linked-list/
  5. Palindrome Linked List - https://leetcode.com/problems/palindrome-linked-list/
  6. Find the Duplicate Number - https://leetcode.com/problems/find-the-duplicate-number/
  7. Remove Nth Node From End of List - https://leetcode.com/problems/remove-nth-node-from-end-of-list/
  8. Reorder List - https://leetcode.com/problems/reorder-list/
  9. Remove Duplicates from Sorted List II - https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/
  10. Circular Array Loop - https://leetcode.com/problems/circular-array-loop/

BACKTRACKING & RECURSION

  1. Permutations - https://leetcode.com/problems/permutations/
  2. Permutations II - https://leetcode.com/problems/permutations-ii/
  3. Combination Sum - https://leetcode.com/problems/combination-sum/
  4. Combination Sum II - https://leetcode.com/problems/combination-sum-ii/
  5. Combination Sum III - https://leetcode.com/problems/combination-sum-iii/
  6. Combinations - https://leetcode.com/problems/combinations/
  7. Subsets - https://leetcode.com/problems/subsets/
  8. Subsets II - https://leetcode.com/problems/subsets-ii/
  9. Palindrome Partitioning - https://leetcode.com/problems/palindrome-partitioning/
  10. Sudoku Solver - https://leetcode.com/problems/sudoku-solver/
  11. N-Queens - https://leetcode.com/problems/n-queens/
  12. N-Queens II - https://leetcode.com/problems/n-queens-ii/
  13. Word Search - https://leetcode.com/problems/word-search/
  14. Word Search II - https://leetcode.com/problems/word-search-ii/
  15. Generate Parentheses - https://leetcode.com/problems/generate-parentheses/
  16. Generalized Abbreviation - https://leetcode.com/problems/generalized-abbreviation/
  17. Expression Add Operators - https://leetcode.com/problems/expression-add-operators/
  18. Restore IP Addresses - https://leetcode.com/problems/restore-ip-addresses/
  19. Remove Invalid Parentheses - https://leetcode.com/problems/remove-invalid-parentheses/
  20. Unique Paths III - https://leetcode.com/problems/unique-paths-iii/

DEVIDE AND CONQUER

  1. Merge k Sorted Lists - https://leetcode.com/problems/merge-k-sorted-lists/
  2. Kth Largest Element in an Array - https://leetcode.com/problems/kth-largest-element-in-an-array/
  3. Search a 2D Matrix II - https://leetcode.com/problems/search-a-2d-matrix-ii/
  4. Pow(x, n) - https://leetcode.com/problems/powx-n/
  5. Majority Element - https://leetcode.com/problems/majority-element/
  6. Reverse Pairs - https://leetcode.com/problems/reverse-pairs/
  7. Count of Range Sum - https://leetcode.com/problems/count-of-range-sum/
  8. Count of Smaller Numbers After Self - https://leetcode.com/problems/count-of-smaller-numbers-after-self/
  9. Longest Substring with At Least K Repeating Characters - https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/
  10. Different Ways to Add Parentheses - https://leetcode.com/problems/different-ways-to-add-parentheses/
  11. Median of Two Sorted Arrays - https://leetcode.com/problems/median-of-two-sorted-arrays/
  12. Reverse Pairs - https://leetcode.com/problems/reverse-pairs/

LINKED LIST

  1. Add Two Numbers - https://leetcode.com/problems/add-two-numbers/
  2. Remove Nth Node From End of List - https://leetcode.com/problems/remove-nth-node-from-end-of-list/
  3. Merge Two Sorted Lists - https://leetcode.com/problems/merge-two-sorted-lists/
  4. Merge k Sorted Lists - https://leetcode.com/problems/merge-k-sorted-lists/
  5. Swap Nodes in Pairs - https://leetcode.com/problems/swap-nodes-in-pairs/
  6. Reverse Nodes in k-Group - https://leetcode.com/problems/reverse-nodes-in-k-group/
  7. Rotate List - https://leetcode.com/problems/rotate-list/
  8. Remove Duplicates from Sorted List II - https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/
  9. Remove Duplicates from Sorted List - https://leetcode.com/problems/remove-duplicates-from-sorted-list/
  10. Partition List - https://leetcode.com/problems/partition-list/
  11. Reverse Linked List II - https://leetcode.com/problems/reverse-linked-list-ii/
  12. Copy List with Random Pointer - https://leetcode.com/problems/copy-list-with-random-pointer/
  13. Linked List Cycle - https://leetcode.com/problems/linked-list-cycle/
  14. Linked List Cycle II - https://leetcode.com/problems/linked-list-cycle-ii/
  15. Reorder List - https://leetcode.com/problems/reorder-list/
  16. Intersection of Two Linked Lists - https://leetcode.com/problems/intersection-of-two-linked-lists/
  17. Remove Linked List Elements - https://leetcode.com/problems/remove-linked-list-elements/
  18. Reverse Linked List - https://leetcode.com/problems/reverse-linked-list/
  19. Palindrome Linked List - https://leetcode.com/problems/palindrome-linked-list/
  20. Add Two Numbers II - https://leetcode.com/problems/add-two-numbers-ii/

STACKS & QUEUES

  1. Valid Parentheses - https://leetcode.com/problems/valid-parentheses/
  2. Min Stack - https://leetcode.com/problems/min-stack/
  3. Implement Stack using Queues - https://leetcode.com/problems/implement-stack-using-queues/
  4. Implement Queue using Stacks - https://leetcode.com/problems/implement-queue-using-stacks/
  5. Evaluate Reverse Polish Notation - https://leetcode.com/problems/evaluate-reverse-polish-notation/
  6. Daily Temperatures - https://leetcode.com/problems/daily-temperatures/
  7. Trapping Rain Water - https://leetcode.com/problems/trapping-rain-water/
  8. Largest Rectangle in Histogram - https://leetcode.com/problems/largest-rectangle-in-histogram/
  9. Maximal Rectangle - https://leetcode.com/problems/maximal-rectangle/
  10. Remove Duplicate Letters - https://leetcode.com/problems/remove-duplicate-letters/
  11. Remove K Digits - https://leetcode.com/problems/remove-k-digits/
  12. Next Greater Element II - https://leetcode.com/problems/next-greater-element-ii/
  13. Next Greater Element I - https://leetcode.com/problems/next-greater-element-i/
  14. 132 Pattern - https://leetcode.com/problems/132-pattern/
  15. Sum of Subarray Minimums - https://leetcode.com/problems/sum-of-subarray-minimums/
  16. Shortest Subarray with Sum at Least K - https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/
  17. Sliding Window Maximum - https://leetcode.com/problems/sliding-window-maximum/
  18. Design Circular Deque - https://leetcode.com/problems/design-circular-deque/
  19. Design Circular Queue - https://leetcode.com/problems/design-circular-queue/
  20. Escape the Spreading Fire - https://leetcode.com/problems/escape-the-spreading-fire/

MONOTONIK STACKS

  1. Daily Temperatures - https://leetcode.com/problems/daily-temperatures/
  2. Next Greater Element I - https://leetcode.com/problems/next-greater-element-i/
  3. Next Greater Element II - https://leetcode.com/problems/next-greater-element-ii/
  4. Largest Rectangle in Histogram - https://leetcode.com/problems/largest-rectangle-in-histogram/
  5. Maximal Rectangle - https://leetcode.com/problems/maximal-rectangle/
  6. Trapping Rain Water - https://leetcode.com/problems/trapping-rain-water/
  7. Sum of Subarray Minimums - https://leetcode.com/problems/sum-of-subarray-minimums/
  8. Sum of Subarray Ranges - https://leetcode.com/problems/sum-of-subarray-ranges/
  9. 132 Pattern - https://leetcode.com/problems/132-pattern/
  10. Remove Duplicate Letters - https://leetcode.com/problems/remove-duplicate-letters/
  11. Remove K Digits - https://leetcode.com/problems/remove-k-digits/
  12. Sliding Window Maximum - https://leetcode.com/problems/sliding-window-maximum/

EXPRESSION EVLUATION

  1. Valid Parentheses - https://leetcode.com/problems/valid-parentheses/
  2. Evaluate Reverse Polish Notation - https://leetcode.com/problems/evaluate-reverse-polish-notation/
  3. Basic Calculator - https://leetcode.com/problems/basic-calculator/
  4. Basic Calculator II - https://leetcode.com/problems/basic-calculator-ii/
  5. Basic Calculator III - https://leetcode.com/problems/basic-calculator-iii/
  6. Score of Parentheses - https://leetcode.com/problems/score-of-parentheses/
  7. Different Ways to Add Parentheses - https://leetcode.com/problems/different-ways-to-add-parentheses/
  8. Decode String - https://leetcode.com/problems/decode-string/
  9. Parsing A Boolean Expression - https://leetcode.com/problems/parsing-a-boolean-expression/
  10. Ternary Expression Parser - https://leetcode.com/problems/ternary-expression-parser/

STRING MANIPULATION

  1. Longest Substring Without Repeating Characters - https://leetcode.com/problems/longest-substring-without-repeating-characters/
  2. Longest Palindromic Substring - https://leetcode.com/problems/longest-palindromic-substring/
  3. Zigzag Conversion - https://leetcode.com/problems/zigzag-conversion/
  4. String to Integer (atoi) - https://leetcode.com/problems/string-to-integer-atoi/
  5. Regular Expression Matching - https://leetcode.com/problems/regular-expression-matching/
  6. Longest Common Prefix - https://leetcode.com/problems/longest-common-prefix/
  7. Find the Index of the First Occurrence in a String (strStr) - https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/
  8. Wildcard Matching - https://leetcode.com/problems/wildcard-matching/
  9. Reverse Words in a String - https://leetcode.com/problems/reverse-words-in-a-string/
  10. One Edit Distance - https://leetcode.com/problems/one-edit-distance/
  11. Basic Calculator II - https://leetcode.com/problems/basic-calculator-ii/
  12. Valid Anagram - https://leetcode.com/problems/valid-anagram/
  13. Ransom Note - https://leetcode.com/problems/ransom-note/
  14. Add Strings - https://leetcode.com/problems/add-strings/
  15. Find All Anagrams in a String - https://leetcode.com/problems/find-all-anagrams-in-a-string/
  16. Validate IP Address - https://leetcode.com/problems/validate-ip-address/
  17. Valid Parenthesis String - https://leetcode.com/problems/valid-parenthesis-string/
  18. Custom Sort String - https://leetcode.com/problems/custom-sort-string/
  19. Reorder Data in Log Files - https://leetcode.com/problems/reorder-data-in-log-files/
  20. Minimum Remove to Make Valid Parentheses - https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/

HASHMAP AND FREQUENCY

  1. Two Sum - https://leetcode.com/problems/two-sum/
  2. Longest Substring Without Repeating Characters - https://leetcode.com/problems/longest-substring-without-repeating-characters/
  3. Group Anagrams - https://leetcode.com/problems/group-anagrams/
  4. Minimum Window Substring - https://leetcode.com/problems/minimum-window-substring/
  5. Top K Frequent Elements - https://leetcode.com/problems/top-k-frequent-elements/
  6. Intersection of Two Arrays - https://leetcode.com/problems/intersection-of-two-arrays/
  7. Intersection of Two Arrays II - https://leetcode.com/problems/intersection-of-two-arrays-ii/
  8. Contains Duplicate - https://leetcode.com/problems/contains-duplicate/
  9. Contains Duplicate III - https://leetcode.com/problems/contains-duplicate-iii/
  10. Repeated DNA Sequences - https://leetcode.com/problems/repeated-dna-sequences/
  11. Subarray Sum Equals K - https://leetcode.com/problems/subarray-sum-equals-k/
  12. Minimum Window Substring - https://leetcode.com/problems/minimum-window-substring/
  13. Longest Consecutive Sequence - https://leetcode.com/problems/longest-consecutive-sequence/
  14. Substring with Concatenation of All Words - https://leetcode.com/problems/substring-with-concatenation-of-all-words/
  15. Longest Substring with At Most Two Distinct Characters - https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/
  16. Longest Substring with At Most K Distinct Characters - https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/
  17. Minimum Window Substring - https://leetcode.com/problems/minimum-window-substring/
  18. 4Sum II - https://leetcode.com/problems/4sum-ii/
  19. Ransom Note - https://leetcode.com/problems/ransom-note/
  20. Longest Harmonious Subsequence - https://leetcode.com/problems/longest-harmonious-subsequence/

BINARY TREES & BST

  1. Binary Tree Inorder Traversal - https://leetcode.com/problems/binary-tree-inorder-traversal/
  2. Binary Tree Preorder Traversal - https://leetcode.com/problems/binary-tree-preorder-traversal/
  3. Binary Tree Postorder Traversal - https://leetcode.com/problems/binary-tree-postorder-traversal/
  4. Binary Tree Level Order Traversal - https://leetcode.com/problems/binary-tree-level-order-traversal/
  5. Binary Tree Level Order Traversal II - https://leetcode.com/problems/binary-tree-level-order-traversal-ii/
  6. Binary Tree Right Side View - https://leetcode.com/problems/binary-tree-right-side-view/
  7. Balanced Binary Tree - https://leetcode.com/problems/balanced-binary-tree/
  8. Maximum Depth of Binary Tree - https://leetcode.com/problems/maximum-depth-of-binary-tree/
  9. Minimum Depth of Binary Tree - https://leetcode.com/problems/minimum-depth-of-binary-tree/
  10. Diameter of Binary Tree - https://leetcode.com/problems/diameter-of-binary-tree/
  11. Binary Tree Paths - https://leetcode.com/problems/binary-tree-paths/
  12. Path Sum - https://leetcode.com/problems/path-sum/
  13. Path Sum II - https://leetcode.com/problems/path-sum-ii/
  14. Binary Tree Maximum Path Sum - https://leetcode.com/problems/binary-tree-maximum-path-sum/
  15. Lowest Common Ancestor of a Binary Tree - https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
  16. Lowest Common Ancestor of a BST - https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
  17. Validate Binary Search Tree - https://leetcode.com/problems/validate-binary-search-tree/
  18. Recover Binary Search Tree - https://leetcode.com/problems/recover-binary-search-tree/
  19. Kth Smallest Element in a BST - https://leetcode.com/problems/kth-smallest-element-in-a-bst/
  20. Search in a BST - https://leetcode.com/problems/search-in-a-bst/
  21. Insert into a BST - https://leetcode.com/problems/insert-into-a-bst/
  22. Delete Node in a BST - https://leetcode.com/problems/delete-node-in-a-bst/
  23. Invert Binary Tree - https://leetcode.com/problems/invert-binary-tree/
  24. Sum Root to Leaf Numbers - https://leetcode.com/problems/sum-root-to-leaf-numbers/
  25. Serialize and Deserialize Binary Tree - https://leetcode.com/problems/serialize-and-deserialize-binary-tree/

PATH SUM (ROOT-LEAF)

  1. Path Sum - https://leetcode.com/problems/path-sum/
  2. Path Sum II - https://leetcode.com/problems/path-sum-ii/
  3. Sum Root to Leaf Numbers - https://leetcode.com/problems/sum-root-to-leaf-numbers/
  4. Path Sum III - https://leetcode.com/problems/path-sum-iii/
  5. Path Sum IV - https://leetcode.com/problems/path-sum-iv/
  6. Lowest Common Ancestor of Deepest Leaves - https://leetcode.com/problems/lowest-common-ancestor-of-deepest-leaves/
  7. Vertical Order Traversal of a Binary Tree - https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/
  8. Sum of Root To Leaf Binary Numbers - https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers/
  9. Minimum Cost Tree From Leaf Values - https://leetcode.com/problems/minimum-cost-tree-from-leaf-values/
  10. Binary Tree Maximum Path Sum - https://leetcode.com/problems/binary-tree-maximum-path-sum/
  11. Diameter of Binary Tree - https://leetcode.com/problems/diameter-of-binary-tree/
  12. Binary Tree Paths - https://leetcode.com/problems/binary-tree-paths/

KTH LARGET/SMALLEST

  1. Kth Largest Element in an Array - https://leetcode.com/problems/kth-largest-element-in-an-array/
  2. Kth Smallest Element in a Sorted Matrix - https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/
  3. Find K Pairs with Smallest Sums - https://leetcode.com/problems/find-k-pairs-with-smallest-sums/
  4. Top K Frequent Words - https://leetcode.com/problems/top-k-frequent-words/
  5. Top K Frequent Elements - https://leetcode.com/problems/top-k-frequent-elements/
  6. Contains Duplicate III - https://leetcode.com/problems/contains-duplicate-iii/
  7. Kth Largest Element in an Array (Heap version) - https://leetcode.com/problems/kth-largest-element-in-an-array/
  8. Kth Largest Element in a Stream - https://leetcode.com/problems/kth-largest-element-in-a-stream/
  9. Kth Smallest Element in a BST - https://leetcode.com/problems/kth-smallest-element-in-a-bst/
  10. Kth Smallest Element in a Sorted Matrix (Binary Search version) - https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/
  11. Find K Pairs with Smallest Sums (Heap version) - https://leetcode.com/problems/find-k-pairs-with-smallest-sums/
  12. K Closest Points to Origin - https://leetcode.com/problems/k-closest-points-to-origin/
  13. Smallest Range Covering Elements from K Lists - https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/
  14. Find K Closest Elements - https://leetcode.com/problems/find-k-closest-elements/
  15. Kth Smallest Element in a Sorted Matrix (Heap version) - https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/

TOP K-ELEMENTS

  1. Top K Frequent Elements - https://leetcode.com/problems/top-k-frequent-elements/
  2. Top K Frequent Words - https://leetcode.com/problems/top-k-frequent-words/
  3. Sort Characters By Frequency - https://leetcode.com/problems/sort-characters-by-frequency/
  4. Top K Frequent Elements (Heap version) - https://leetcode.com/problems/top-k-frequent-elements/
  5. K Closest Points to Origin - https://leetcode.com/problems/k-closest-points-to-origin/
  6. LRU Cache - https://leetcode.com/problems/lru-cache/
  7. Top K Frequent Elements (Bucket Sort version) - https://leetcode.com/problems/top-k-frequent-elements/
  8. Top K Frequent Elements (Quick Select version) - https://leetcode.com/problems/top-k-frequent-elements/
  9. Top K Frequent Words (Trie + Heap variant) - https://leetcode.com/problems/top-k-frequent-words/
  10. Sort Characters By Frequency (Heap variant) - https://leetcode.com/problems/sort-characters-by-frequency/

MERGE K-SORTED LIST

  1. Merge k Sorted Lists - https://leetcode.com/problems/merge-k-sorted-lists/
  2. Merge Two Sorted Lists - https://leetcode.com/problems/merge-two-sorted-lists/
  3. Merge k Sorted Lists (Heap version) - https://leetcode.com/problems/merge-k-sorted-lists/
  4. Merge k Sorted Lists (Divide & Conquer version) - https://leetcode.com/problems/merge-k-sorted-lists/
  5. Merge k Sorted Lists (Priority Queue variant) - https://leetcode.com/problems/merge-k-sorted-lists/

DYNAMIC PROGRAMMING

  1. Climbing Stairs - https://leetcode.com/problems/climbing-stairs/
  2. Fibonacci Number - https://leetcode.com/problems/fibonacci-number/
  3. Min Cost Climbing Stairs - https://leetcode.com/problems/min-cost-climbing-stairs/
  4. House Robber - https://leetcode.com/problems/house-robber/
  5. House Robber II - https://leetcode.com/problems/house-robber-ii/
  6. House Robber III - https://leetcode.com/problems/house-robber-iii/
  7. Minimum Path Sum - https://leetcode.com/problems/minimum-path-sum/
  8. Unique Paths - https://leetcode.com/problems/unique-paths/
  9. Unique Paths II - https://leetcode.com/problems/unique-paths-ii/
  10. Triangle - https://leetcode.com/problems/triangle/
  11. Maximal Square - https://leetcode.com/problems/maximal-square/
  12. Coin Change - https://leetcode.com/problems/coin-change/
  13. Coin Change 2 - https://leetcode.com/problems/coin-change-2/
  14. House Robber (variant) - https://leetcode.com/problems/house-robber/
  15. Combination Sum IV - https://leetcode.com/problems/combination-sum-iv/
  16. Word Break - https://leetcode.com/problems/word-break/
  17. Word Break II - https://leetcode.com/problems/word-break-ii/
  18. Longest Palindromic Subsequence - https://leetcode.com/problems/longest-palindromic-subsequence/
  19. Longest Palindromic Substring - https://leetcode.com/problems/longest-palindromic-substring/
  20. Edit Distance - https://leetcode.com/problems/edit-distance/
  21. Distinct Subsequences - https://leetcode.com/problems/distinct-subsequences/
  22. Decode Ways - https://leetcode.com/problems/decode-ways/
  23. Regular Expression Matching - https://leetcode.com/problems/regular-expression-matching/
  24. Min Cost Climbing Stairs (variant) - https://leetcode.com/problems/min-cost-climbing-stairs/
  25. Best Time to Buy and Sell Stock with Cooldown - https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
  26. Best Time to Buy and Sell Stock II - https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
  27. Best Time to Buy and Sell Stock III - https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/
  28. Best Time to Buy and Sell Stock IV - https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/
  29. Best Time to Buy and Sell Stock with Transaction Fee - https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/
  30. Decode Ways (variant) - https://leetcode.com/problems/decode-ways/
  31. Unique Paths II (variant) - https://leetcode.com/problems/unique-paths-ii/
  32. Unique Paths (variant) - https://leetcode.com/problems/unique-paths/
  33. Triangle (variant) - https://leetcode.com/problems/triangle/
  34. Coin Change 2 (variant) - https://leetcode.com/problems/coin-change-2/
  35. Longest Palindromic Subsequence (variant) - https://leetcode.com/problems/longest-palindromic-subsequence/
  36. Longest Palindromic Substring (variant) - https://leetcode.com/problems/longest-palindromic-substring/
  37. Maximum Subarray - https://leetcode.com/problems/maximum-subarray/
  38. House Robber (variant) - https://leetcode.com/problems/house-robber/
  39. House Robber II (variant) - https://leetcode.com/problems/house-robber-ii/
  40. Maximal Square (variant) - https://leetcode.com/problems/maximal-square/
  41. Edit Distance (variant) - https://leetcode.com/problems/edit-distance/
  42. Regular Expression Matching (variant) - https://leetcode.com/problems/regular-expression-matching/

GREEDY

  1. Non-overlapping Intervals - https://leetcode.com/problems/non-overlapping-intervals/
  2. Meeting Rooms - https://leetcode.com/problems/meeting-rooms/
  3. Meeting Rooms II - https://leetcode.com/problems/meeting-rooms-ii/
  4. Merge Intervals - https://leetcode.com/problems/merge-intervals/
  5. Minimum Number of Arrows to Burst Balloons - https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/
  6. Find Right Interval - https://leetcode.com/problems/find-right-interval/
  7. Remove Covered Intervals - https://leetcode.com/problems/remove-covered-intervals/
  8. Meeting Rooms II (Heap variant) - https://leetcode.com/problems/meeting-rooms-ii/
  9. Video Stitching - https://leetcode.com/problems/video-stitching/
  10. Non-overlapping Intervals (Sorting variant) - https://leetcode.com/problems/non-overlapping-intervals/
  11. Meeting Scheduler - https://leetcode.com/problems/meeting-scheduler/
  12. Car Pooling - https://leetcode.com/problems/car-pooling/
  13. Minimum Number of Arrows to Burst Balloons (Sorting variant) - https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/
  14. Meeting Rooms II (Priority Queue variant) - https://leetcode.com/problems/meeting-rooms-ii/
  15. Interval List Intersections - https://leetcode.com/problems/interval-list-intersections/

GRAPH TRAVERSAL

  1. Number of Islands - https://leetcode.com/problems/number-of-islands/
  2. Graph Valid Tree - https://leetcode.com/problems/graph-valid-tree/
  3. Clone Graph - https://leetcode.com/problems/clone-graph/
  4. Course Schedule - https://leetcode.com/problems/course-schedule/
  5. Course Schedule II - https://leetcode.com/problems/course-schedule-ii/
  6. Longest Increasing Path in a Matrix - https://leetcode.com/problems/longest-increasing-path-in-a-matrix/
  7. Surrounded Regions - https://leetcode.com/problems/surrounded-regions/
  8. Is Graph Bipartite? - https://leetcode.com/problems/is-graph-bipartite/
  9. Flood Fill - https://leetcode.com/problems/flood-fill/
  10. Evaluate Division - https://leetcode.com/problems/evaluate-division/
  11. Rotting Oranges - https://leetcode.com/problems/rotting-oranges/
  12. All Paths From Source to Target - https://leetcode.com/problems/all-paths-from-source-to-target/
  13. Shortest Distance from All Buildings - https://leetcode.com/problems/shortest-distance-from-all-buildings/
  14. Partition Labels - https://leetcode.com/problems/partition-labels/
  15. Network Delay Time - https://leetcode.com/problems/network-delay-time/
  16. Course Schedule (DFS variant) - https://leetcode.com/problems/course-schedule/
  17. Course Schedule II (Topological Sort variant) - https://leetcode.com/problems/course-schedule-ii/
  18. Longest Increasing Path in a Matrix (DFS + Memoization) - https://leetcode.com/problems/longest-increasing-path-in-a-matrix/
  19. The Maze - https://leetcode.com/problems/the-maze/
  20. Word Ladder - https://leetcode.com/problems/word-ladder/

GRAPH ALGORTHIMS

  1. Cheapest Flights Within K Stops - https://leetcode.com/problems/cheapest-flights-within-k-stops/
  2. Network Delay Time - https://leetcode.com/problems/network-delay-time/
  3. Min Cost to Connect All Points - https://leetcode.com/problems/min-cost-to-connect-all-points/
  4. Connecting Cities With Minimum Cost - https://leetcode.com/problems/connecting-cities-with-minimum-cost/ Kruskal / MST variant - https://leetcode.com/problems/connecting-cities-with-minimum-cost/
  5. Course Schedule - https://leetcode.com/problems/course-schedule/
  6. Course Schedule II - https://leetcode.com/problems/course-schedule-ii/
  7. Alien Dictionary - https://leetcode.com/problems/alien-dictionary/
  8. Evaluate Division - https://leetcode.com/problems/evaluate-division/
  9. Path with Maximum Probability - https://leetcode.com/problems/path-with-maximum-probability/
  10. Network Delay Time (Dijkstra variant) - https://leetcode.com/problems/network-delay-time/
  11. Pacific Atlantic Water Flow - https://leetcode.com/problems/pacific-atlantic-water-flow/
  12. Network Delay Time (Heap variant) - https://leetcode.com/problems/network-delay-time/
  13. Cheapest Flights Within K Stops (Bellman-Ford variant) - https://leetcode.com/problems/cheapest-flights-within-k-stops/
  14. Redundant Connection - https://leetcode.com/problems/redundant-connection/
  15. Redundant Connection II - https://leetcode.com/problems/redundant-connection-ii/
  16. Connecting Cities With Minimum Cost (Union-Find variant) - https://leetcode.com/problems/connecting-cities-with-minimum-cost/
  17. Path With Minimum Effort - https://leetcode.com/problems/path-with-minimum-effort/
  18. Optimize Water Distribution in a Village - https://leetcode.com/problems/optimize-water-distribution-in-a-village/
  19. Find the City With the Smallest Number of Neighbors at a Threshold Distance - https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/

DESIGN PROBLEMS

  1. LRU Cache - https://leetcode.com/problems/lru-cache/
  2. LFU Cache - https://leetcode.com/problems/lfu-cache/
  3. Design Circular Queue - https://leetcode.com/problems/design-circular-queue/
  4. Design Circular Deque - https://leetcode.com/problems/design-circular-deque/
  5. Min Stack - https://leetcode.com/problems/min-stack/
  6. Maximum Frequency Stack - https://leetcode.com/problems/maximum-frequency-stack/
  7. Design A Leaderboard - https://leetcode.com/problems/design-a-leaderboard/
  8. Logger Rate Limiter - https://leetcode.com/problems/logger-rate-limiter/
  9. Lonely Pixel I - https://leetcode.com/problems/lonely-pixel-i/
  10. Gas Station (Design variant) - https://leetcode.com/problems/gas-station/
  11. Copy List with Random Pointer - https://leetcode.com/problems/copy-list-with-random-pointer/
  12. Design HashMap - https://leetcode.com/problems/design-hashmap/
  13. Design HashSet - https://leetcode.com/problems/design-hashset/
  14. Diet Plan Performance (Queue variant) - https://leetcode.com/problems/diet-plan-performance/
  15. Design a Stack With Increment Operation - https://leetcode.com/problems/design-a-stack-with-increment-operation/

OTHER

  1. Bit Manipulation

Single Number – https://leetcode.com/problems/single-number/

Reverse Bits – https://leetcode.com/problems/reverse-bits/

Single Number III – https://leetcode.com/problems/single-number-iii/

Number of 1 Bits – https://leetcode.com/problems/number-of-1-bits/

Power of Two – https://leetcode.com/problems/power-of-two/

Counting Bits – https://leetcode.com/problems/counting-bits/

Sum of Two Integers – https://leetcode.com/problems/sum-of-two-integers/

Maximum XOR of Two Numbers in an Array – https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/

  1. Matrix / 2D Grid Problems

Set Matrix Zeroes – https://leetcode.com/problems/set-matrix-zeroes/

Word Search – https://leetcode.com/problems/word-search/

Number of Islands – https://leetcode.com/problems/number-of-islands/

Unique Paths – https://leetcode.com/problems/unique-paths/

  1. Heap Variants / Priority Queue

Kth Largest Element in an Array – https://leetcode.com/problems/kth-largest-element-in-an-array/

Find Median from Data Stream – https://leetcode.com/problems/find-median-from-data-stream/

Top K Frequent Elements – https://leetcode.com/problems/top-k-frequent-elements/

  1. Trie / Prefix Tree

Implement Trie (Prefix Tree) – https://leetcode.com/problems/implement-trie-prefix-tree/

Add and Search Word – https://leetcode.com/problems/add-and-search-word-data-structure-design/

Word Search II – https://leetcode.com/problems/word-search-ii/

  1. Union-Find / Disjoint Set

Number of Islands – https://leetcode.com/problems/number-of-islands/

Number of Provinces – https://leetcode.com/problems/number-of-provinces/

Surrounded Regions – https://leetcode.com/problems/surrounded-regions/

  1. Geometry / Sweep Line (Advanced Intervals)

Meeting Rooms – https://leetcode.com/problems/meeting-rooms/

Meeting Rooms II – https://leetcode.com/problems/meeting-rooms-ii/

Interval List Intersections – https://leetcode.com/problems/interval-list-intersections/

  1. Advanced DP Topics

Decode Ways – https://leetcode.com/problems/decode-ways/

Matchsticks to Square – https://leetcode.com/problems/matchsticks-to-square/

Burst Balloons – https://leetcode.com/problems/burst-balloons/

House Robber – https://leetcode.com/problems/house-robber/

House Robber II – https://leetcode.com/problems/house-robber-ii/

House Robber III – https://leetcode.com/problems/house-robber-iii/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published