Available question text
Given counts of blocks "AA", "BB", and "AB", choose and order some blocks to build the longest concatenated string that does not contain "AAA" or "BBB". The core challenge is optimally sequencing double-letter blocks and using "AB" pieces as separators to prevent triple repeats and maximize total length.
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 2745. Construct the Longest New String
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source