Capital One interview question

Questions from basic DSA topics