Algorithms exam cheatsheet