UKG interview question

Puzzles and Basic DSA questions