ZS Associates interview question

Puzzles, SQL, guess estimates, basic dsa