Sunday, November 29, 2020

Happygirlzt: LeetCode入门(漫谈常见题型与解法)

 Here is the link. 

I will spend 30 minutes to watch the video Sunday morning. I will do that first thing in the morning. 


Arrays

  • Two pointers (sliding window)
  • Binary search ( sorted, search space)
  • Combined with Map 
  • Prefix sum ( DP )
  • Quick select (kth ...)

Stacks

   familiar with some monotonic stack questions

  • Maximum rectangle
  • Next greater elements
  • Trapping rain water - optimal, two pointers

   

   Next 

Queue  BFS

Graphs   BFS, DFS, Dijkstra's

Backtracking 

  • permutation - all possibilities
  • subsets
  • combination sum
  • partition equal
  • subset sum
  • N-Queen
  • Sudoku


Dynamic programming

  •  total ways
  • True/ False
  • max/ min

  • 0/1 Knapsack
  • perfect squares
  • Coin changes - total ways, minimum
  • climbing stairs 
  • decode ways
  • string related
    • regular expression matching
    • wildcard matching
    • Edit distance
    • LIS / LCS
  • 2D matrix
    • maximum square
    • range sum query
    • bomb enemy
    • unique paths, total ways
  • greedy  Heap (sort)  
    • Top K
    • Campus bikes
    • merge k sorted lists



No comments:

Post a Comment