Greedy, every time compute length between start and i, i.e. max(res, i - start + 1). If num[i] <= num[i - 1], set start = i;
Error:
too many stupid error, we need to update the start point, and count the length correctly
Greedy, every time compute length between start and i, i.e. max(res, i - start + 1). If num[i] <= num[i - 1], set start = i;
Error:
too many stupid error, we need to update the start point, and count the length correctly