Capgemini interview question

Basic leetcode easy and string parsing questions,