Code from 6.00 Intro to Programming and Algorithms