Skip to content

Commit

Permalink
py imp
Browse files Browse the repository at this point in the history
  • Loading branch information
Azureki committed Apr 18, 2020
1 parent 7465ad4 commit 0f9b777
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 1408. String Matching in an Array/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Solution:
def stringMatching(self, words: List[str]) -> List[str]:
res = []
length = len(words)
for i in range(length):
for j in range(length):
if i!=j and (words[i] in words[j]):
res.append(words[i])
break
return res

0 comments on commit 0f9b777

Please sign in to comment.