prices holds a stock's price day by day. A rising streak is a run of **consecutive** days where the price is strictly higher each day than the day before. A single day on its own is also a streak of length 1.
Return the length of the longest rising streak.prices=[5, 8, 2, 4, 6, 9, 9, 10] → 4
The longest unbroken rise is [2, 4, 6, 9], four days. Then 9 → 9: the price did not go up, so the rise ends.
prices=[3, 3, 3] → 1
The price never strictly rises, so a rise is a single day long.
prices=[-4, -1, 0, -2] → 3
prices=[5, 8, 2, 4, 6, 9, 9, 10]
4
Run checks the first 3 tests in your browser. Submit checks all 135 tests on the server, hidden ones included.