Basic Array Program In Leetcode 150 Problem