CSC interview question

asked an easy leetcode question