Three in a Row
logs has a column num of ints, in order. Return a sorted list of every number that appears at least three times in a row (in three or more neighbouring rows), each listed once.
Example 1
logs {"num":[1,1,1,2,1,2,2]}
returns [1]
Only 1 appears three times in a row.
Constraints
- The result may be an empty list
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.