Problem 984 · Medium

String Without AAA or BBB

Build a string from a, b and c counts, always adding the most plentiful letter that does not make three in a row.

Open the interactive visualisation