Domanda di colloquio di Algoworks

puzzles from gfg and easy technical question