A=B
Not enough ratings
No Three In A Row
   
Award
Favorite
Favorited
Unfavorite
Tags: level
File Size
Posted
1.303 KB
5 Jan, 2024 @ 9:59am
1 Change Note ( view )

Subscribe to download
No Three In A Row

Description
Input: A string of "a", "b" and "c".
Output: Replace each "c" with an "a" or "b" so there aren't three "a"'s or "b"'s in a row, return "false" if there are no solutions, or return "true" if there are multiple solutions.
Constraint: 3 <= Input length <= 7
2 Comments
カズエイ 23 Feb @ 9:19pm 
3 lines (/9 lines)

cbc=bba
acaccb=true
aacbb=false
295820878 18 Feb, 2024 @ 6:26pm 
Test cases not set. Keywords not allowed. Target was 9 lines. I got 3 lines(for the 3 test cases), 9 lines(using keywords) or 20 lines(including things like truea=true)