C Programming Array Problems Leetcode