Citi interview question

Basic DSA questions, puzzles questions