#83. either24
either24
Background
Description
Given an array of ints, return true if the array contains a 2 next to a 2 or a 4 next to a 4, but not both.
Format
Input
Output
Samples
[1 2 2]
true
[4 4 1]
true
[4 4 1 2 2]
false
Limitation
1s, 1024KiB for each test case.