Skip to content

Algorithm Check List

  • Two pointers
  • Minimum steps between A & B
    • work backwards
  • Dynamic programming -> binary search + greedy
  • Dynamic programming
    • step function: before i/after i
  • <1000_000 use array
  • hash same string multiple times but different part -> polyhash
  • %2 check !=0, not ==1 (can be -1)
  • Is input sorted?

Mod Identities

  • (a + b) mod n = [(a mod n) + (b mod n)] mod n
  • ab mod n = [(a mod n)(b mod n)] mod n

image-20201103013221911-1604385142

image-20201126090512425-1606399513


Last update: March 26, 2021
Created: March 26, 2021