Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 984. String Without AAA or BBB
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.