GlobalLogic Interview Question

Easy Leetcode problem ,and basic cs