Notes and code for Algorithms I