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
This discussion was converted from issue #3 on September 15, 2026 10:57.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem link
https://leetcode.com/problems/count-sorted-vowel-strings/submissions/
Problem Summary
n 개의 모음을 이어 붙일 수 있다. 이때 사전 순으로 정렬된 문자열의 개수를 구하는 문제.
Solution
딱 보니 DP로 풀어야겠다는 생각이 든다.
로 두면 DP[i][j] = DP[i - 1][k] (0 <= k <= j)가 된다.
추가로 DP[i] 행은 계속 덮어 띄워지므로 1차원으로 줄일 수 있다. DP[j]: j번째 모음으로 시작하는 문자열의 개수
Source Code
All reactions