mirror of
https://github.com/dholerobin/Lecture_Notes.git
synced 2025-07-01 13:06:29 +00:00
Fix code indentation
This commit is contained in:
parent
1eaa3c0de9
commit
eb1c9f64af
@ -92,7 +92,6 @@ B = ["cat", "cats", "and", "sand", "dog"]
|
|||||||
|
|
||||||
Output 1:
|
Output 1:
|
||||||
["cat sand dog", "cats and dog"]
|
["cat sand dog", "cats and dog"]
|
||||||
```
|
|
||||||
```python
|
```python
|
||||||
def wordBreak(A, B):
|
def wordBreak(A, B):
|
||||||
B = set(B)
|
B = set(B)
|
||||||
@ -103,7 +102,6 @@ if i == len(A):
|
|||||||
if word in B:
|
if word in B:
|
||||||
sents.append((sent + ' ' + word).strip())
|
sents.append((sent + ' ' + word).strip())
|
||||||
return
|
return
|
||||||
|
|
||||||
if word in B:
|
if word in B:
|
||||||
foo(i+1, i+1, sent + ' ' + word)
|
foo(i+1, i+1, sent + ' ' + word)
|
||||||
foo(i+1, start, sent)
|
foo(i+1, start, sent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user