Skip to content

skvictoria/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode

https://leetcode.com/

  1. Prefix sum
  • Use case: Query sum of elements in a subarray
  • 303, 525, 560
  1. Two pointers
  • Use case: palindrom
  • 11, 15, 167
  1. Sliding Window
  • Use case: subarray, substring
  • 3, 76, 643
  1. Fast and Slow Pointers
  • Use case: if a linked list contains cycle?, middle of the linked list
  • 141, 202, 287
  1. Linked list in-place reversal
  • Use case: Reverse a linked list, rearrange the list
  • Use three points (prev, curr, next)
  • 24, 92, 206
  1. Monotonic Stack
  • Use case: Next greater/next smaller item in the array
  • 84, 496, 739
  1. Top k elements
  • Use case: K largest/smallest/most frequent
  • Using min/max heap
  • 215, 347, 373
  1. Overlapping Intervals
  • Use case: merging interval, interval intersection, insert interval, find minimum meeting rooms
  • 56, 57, 435
  1. Modified Binary Search
  • Use case:
  • 33, 153, 240
  1. Binary Tree Traversal
  • 107, 124, 230, 257
  1. DFS
  • 113, 133, 210
  1. BFS
  • 102, 127, 994
  1. Matrix Traversal
  • 130, 200, 733
  1. Backtracking
  • 46, 51, 78
  1. DP
  • 70, 300, 312, 322, 416, 1143

Also referenced Sahil Gaba's linkedin post as follows:

  1. BFS and DFS:
  1. Dynamic Programming:
  1. Backtracking:
  1. Sliding Window:
  1. Top k Elements:

About

https://leetcode.com/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •