#260. noTriples
noTriples
Background
Description
Given an array of ints, we'll say that a triple is a value appearing 3 times in a row in the array. Return true if the array does not contain any triples.
Format
Input
Output
Samples
[1 1 2 2 1]
true
[1 1 2 2 2 1]
false
[1 1 1 2 2 2 1]
false
Limitation
1s, 1024KiB for each test case.