2082. Minimum Cost to Separate Sentence Into Rows

Medium
Array
Dynamic Programming

Description

Hints

Hint 1
Create an array storing all of the words in sentence separated.
Hint 2
Try dynamic programming.
Hint 3
Build a dp array where dp[i] represents the minimum total cost for the first i + 1 words.

Statistics

Acceptance
50.9%
Submissions
4,742
Accepted
2,414