Some algorithms I've implemented.