The TransCompilator

Solved LeetCode program · 480 of 1,000

#0674 · Longest Continuous Increasing Subsequence

Easy Array chunk-10.md

Original English source

The numbers is a list of 1, 3, 5, 4, and 7. The last is the last position of numbers. The longest is 1. The run is 1.
For every spot from 1 to last.
If item spot of numbers is more than item (spot minus 1) of numbers, add 1 to run, otherwise set run to 1. If run is more than longest, set longest to run.

Show longest.

Open in Playground Browse all 1,000 problems

Expected stdout

3