You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.