Random programs written while preparing for a Google interview