Problems with tag O(nlog(sum(nums)))