Leetcode Problem On Nested Array