Practice40 min
Practice: Clever Commitments
Building runs from the smallest card, filtered triplet merging, last-occurrence partitioning, and min/max open-paren ranges.
Each of these hides its greedy rule: start every run at the smallest remaining card, only merge triplets that never exceed the target, cut partitions at last occurrences, and track a range of possible open-paren counts instead of one.
Problems0 of 4 solved
- Not startedHand of Straightscount map + greedily build runs from smallest cardmedium
- Not startedMerge Triplets to Form Target Tripletgreedy: keep triplets with no value exceeding targetmedium
- Not startedPartition Labelslast-occurrence map + extend window to its endmedium
- Not startedValid Parenthesis Stringgreedy min/max open-parenthesis count rangemedium