• [deleted]
    + 1 comment

    Doesn't an array which size is 0 (empty) considered subarray? In first testcase, (maybe) intended solution doesn't considered a empty array is a valid subarray.

    IMHO, these consideration should be declared in the problem statement.