An interesting interview problem :)