Search
⌘K
Get Premium
Leetcode 2745. Construct the Longest New String
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.
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.