数据结构与算法

  1. Two Pointers
  2. Binary Tree BFS
  3. Topological Sort
  4. Binary Tree DFS
  5. Top K Elements
  6. Modified Binary Search
  7. Subset
  8. Sliding Window


时间与空间复杂度

What is Big O Notation

Time complexity = a way of showing the runtime if a fuction increases as the size of the input increases

Space complexity = a way of showing the memory if a function increases as the size of the input


Types of Big O Notation


How to determine O(n)

  1. find the fastest growing term
  2. take out the coefficient (系数)