Skip to content

Commit

Permalink
Update scramble-string.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed Feb 16, 2015
1 parent 0dc7e39 commit 0b03eeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/scramble-string.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Solution:
def isScramble(self, s1, s2):
if not s1 or not s2 or len(s1) != len(s2):
return False
if len(s1) == 0:
if not s1:
return True
result = [[[False for j in xrange(len(s2))] for i in xrange(len(s1))] for n in xrange(len(s1) + 1)]
for i in xrange(len(s1)):
Expand All @@ -67,4 +67,4 @@ def isScramble(self, s1, s2):
return result[n][0][0]

if __name__ == "__main__":
print Solution().isScramble("rgtae", "great")
print Solution().isScramble("rgtae", "great")

0 comments on commit 0b03eeb

Please sign in to comment.