inversion counting Link to heading

explain

quick select and kth smallest and/or largest Link to heading

when asking kth smallest and/or largest questions, and ask for time complexity less than O(nlogn), must be quickselect.

topological sort Link to heading

explain

union find Link to heading

explain

Union-Find is a data structure that can keep track of a set of elements partitioned into a number of disjoint (non-overlapping) subsets. It is also known as disjoint-set data structure.

it supports 3 operations:

  1. find()
  2. union(a, b)
  3. addset(a)

dp (top down & bottom up) vs (memorization vs tabulation) Link to heading

see here