ZS Associates Interview Question

they asked me many puzzles