JPMorganChase interview question

1 leetcode easy 1 leetcode medium problems. Find duplicate in array. Maximum Subarray.