Skip to content

Latest commit

 

History

History
104 lines (78 loc) · 4.61 KB

File metadata and controls

104 lines (78 loc) · 4.61 KB

Array & Strings

  1. https://leetcode.com/problems/two-sum/
  2. https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/
  3. https://leetcode.com/problems/maximum-subarray/
  4. https://leetcode.com/problems/product-of-array-except-self/description/
  5. https://leetcode.com/problems/merge-intervals/description/
  6. https://leetcode.com/problems/3sum/description/
  7. https://leetcode.com/problems/valid-palindrome/description/
  8. https://leetcode.com/problems/minimum-window-substring/description/
  9. https://leetcode.com/problems/longest-substring-without-repeating-characters/description/
  10. https://leetcode.com/problems/group-anagrams/
  11. https://leetcode.com/problems/valid-anagram/description/

Matrix

  1. https://leetcode.com/problems/flipping-an-image/description/
  2. https://leetcode.com/problems/rotate-image/description/

Hashmap

  1. https://leetcode.com/problems/intersection-of-two-arrays-ii/description/
  2. https://leetcode.com/problems/subarray-sum-equals-k/description/
  3. https://leetcode.com/problems/first-unique-character-in-a-string/description/
  4. https://leetcode.com/problems/happy-number/description/
  5. https://leetcode.com/problems/top-k-frequent-elements/description/

Sliding Window

The sliding window technique is effective when all elements in the array are non-negative because the sum of the window moves monotonically in one direction as the window expands or shrinks. However, if the array contains negative numbers, the sum of the current window can increase, decrease, or oscillate unpredictably. This behavior makes it impossible to determine whether to shrink or expand the window deterministically.

  1. https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/description/
  2. https://leetcode.com/problems/minimum-size-subarray-sum/description/
  3. https://leetcode.com/problems/sliding-window-maximum/description/
  4. https://leetcode.com/problems/permutation-in-string/
  5. https://leetcode.com/problems/longest-repeating-character-replacement/description/

Two Pointer

  1. https://leetcode.com/problems/valid-palindrome/
  2. https://leetcode.com/problems/longest-palindromic-substring/
  3. https://leetcode.com/problems/3sum/
  4. https://leetcode.com/problems/reverse-words-in-a-string/
  5. https://leetcode.com/problems/meeting-rooms-ii/description/
  6. https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/

Stacks & Queues

  1. https://leetcode.com/problems/simplify-path/description/

Prefix Sum

Linked List

Bitwise

Recursion

Binary Search

  1. https://leetcode.com/problems/search-in-rotated-sorted-array/description/
  2. https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/description/
  3. https://leetcode.com/problems/median-of-two-sorted-arrays/description/
  4. https://leetcode.com/problems/search-a-2d-matrix/description/
  5. https://leetcode.com/problems/kth-smallest-element-in-a-bst/description/

Trees

  1. https://leetcode.com/problems/validate-binary-search-tree/description/
  2. https://leetcode.com/problems/maximum-depth-of-binary-tree/description/
  3. https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/description/
  4. https://leetcode.com/problems/serialize-and-deserialize-binary-tree/description/
  5. https://leetcode.com/problems/path-sum/description/
  6. https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/

Backtracking

  1. https://leetcode.com/problems/letter-combinations-of-a-phone-number/description/
  2. https://leetcode.com/problems/permutations/
  3. https://leetcode.com/problems/subsets/
  4. https://leetcode.com/problems/word-search/
  5. https://leetcode.com/problems/n-queens/

Dynamic Programming

  1. https://leetcode.com/problems/climbing-stairs/description/
  2. https://leetcode.com/problems/decode-ways/description/
  3. https://leetcode.com/problems/coin-change/
  4. https://leetcode.com/problems/longest-increasing-subsequence/
  5. https://leetcode.com/problems/word-break/description/
  6. https://leetcode.com/problems/house-robber/description/
  7. https://leetcode.com/problems/unique-paths/
  8. https://leetcode.com/problems/edit-distance/

Graphs (BFS, DFS, Union-Find)

  1. https://leetcode.com/problems/number-of-islands/
  2. https://leetcode.com/problems/clone-graph/description/
  3. https://leetcode.com/problems/course-schedule/
  4. https://leetcode.com/problems/word-ladder/
  5. https://leetcode.com/problems/minimum-height-trees/
  6. https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/description/
  7. https://leetcode.com/problems/alien-dictionary/description/
  8. https://leetcode.com/problems/graph-valid-tree/description/