The TransCompilator

Solved LeetCode program · 74 of 1,000

#0074 · Search a 2D Matrix

Medium Array chunk-02.md

Original English source

The matrix is a list of 1, 3, 5, 7, 10, 11, 16, 20, 23, 30, 34, 50. The target is 3. The found is -1.
For every position from 0 to the last position of matrix.
If item position of matrix is target, set found to position, then stop.

If found is not equal to -1, report true, otherwise report false.

Open in Playground Browse all 1,000 problems

Expected stdout

true