Skip to content

Commit 62bf335

Browse files
author
sejineer
committed
word-break add comment
1 parent 2800728 commit 62bf335

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

word-break/sejineer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
시간 복잡도: O(n * D * L) n = 문자열 길이, D = 사전 크기, L = 단어 평균 길이
3+
공간 복잡도: O(n)
4+
"""
15
class Solution:
26
def wordBreak(self, s: str, wordDict: List[str]) -> bool:
37

0 commit comments

Comments
 (0)