according to the example:
Example 3: Given the array [2, 0, 2, 1, 3], return false since 0 is not supposed to appear in the array.
I conclude that, if there is an zero in the array, the answer should be false; but the test case 1, 2, 0, 3, 4 expect true.
Is the example wrong? or the test case?
@wang.senyuan I also agree with you because the first sentence said:"You are given an array of positive and negative integers.",which means the array doesn't containt the zero.But....
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.