Ezvor

3119. Maximum Number of Potholes That Can Be Fixed

MediumString Preparing judge… LeetCode
StringGreedySorting

Hints

Hint 1
Find all consecutive blocks of ’x’.
Hint 2
Sort them by their length.
Hint 3
Try to fix the block from the largest one until you have enough budget.