more general solution to yesterday's interview question
more io practice