Domanda di colloquio di Google

Coding based problem and SQL question as well