>_
word_break.kt
Kotlin 2.4
Not run yet

+ 7 hidden

Input
s = "paintpaintbrush"
words = ["brush", "paint", "pain", "rush"]
Expected
true

paint + paint + brush covers the whole string, using paint twice.