Skip to content

Commit d73a9c6

Browse files
committed
[2942] [Time Beats: 88.48%] [Memory Beats: 31.58%] - LeetPush
1 parent f008a3b commit d73a9c6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class Solution(object):
2+
def findWordsContaining(self, words, x):
3+
"""
4+
:type words: List[str]
5+
:type x: str
6+
:rtype: List[int]
7+
"""
8+
_list = []
9+
# word_idx = {}
10+
# for i in range(len(words)):
11+
# word_idx[words[i]]=i
12+
i = 0
13+
for word in words:
14+
if x in word:
15+
_list.append(i)
16+
i += 1
17+
return _list
18+

0 commit comments

Comments
 (0)