my code for the stanford algorithms class I'm taking on coursera