Available question text
Construct a string of length a+b containing exactly a 'a's and b 'b's that never contains "aaa" or "bbb" (no three identical letters in a row). The core challenge is a greedy placement problem: choose which letter to append at each step so you use up the counts without creating a triple.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 984. String Without AAA or BBB
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source