Domanda di colloquio di Amazon

some basic questions on logical thinking