• + 1 comment

    There is a problem with the first sentence of the problem description: a subarray is a contiguous slice of the parent array. However the actual test cases allow using any subset of the input.