ZS Associates interview question

Puzzles from gfg top 10