Problem 3955 · Medium

Valid Binary Strings With Cost Limit

Build strings one position at a time, never placing two 1s in a row and pruning any branch whose cost is already too high.

Open the interactive visualisation