The TransCompilator

Solved LeetCode program · 250 of 1,000

#0334 · Increasing Triplet Subsequence

Medium Array chunk-05.md

Original English source

The numbers is a list of 1, 2, 3, 4, and 5. The first is 1000000000. The second is 1000000000. The found is 0.
For each value in numbers.
If found is 1, stop. If value is at most first, set first to value. If value is more than first and value is at most second, set second to value. If value is more than second, set found to 1.

If found is 1, show true, otherwise show false.

Open in Playground Browse all 1,000 problems

Expected stdout

true