โ† American Express questions
CodingModerate

Largest string with character frequency limits and no triple repeats

Filed under American Express

The question

Given the maximum allowed occurrences of characters 'a', 'b', and 'c', construct the longest possible string containing only these characters such that no three consecutive characters are the same.

No write-up yet. Related questions below have one.

Related American Express questions

Collected from public candidate posts and coding forums. Updated Nov 2026.