Array Basic Question In Leetcode