IBM interview question

One leetcode easy during interview