Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
def is_rotation(s1,s2):
if s1 == None:
return False
elif s1 == '' and len(s2) != 0:
return False
elif s1 == '' and s2 == '':
return True
elif len(s1) != len(s2):
return False
else:
for i in range(len(s1)):
if s1[i:] and s2[:i]:
return True

s1 = 'foobarbaz'
s2 = 'barbazfoo'
is_rotation(s1,s2)
Binary file added build.pyc
Binary file not shown.
Binary file added tests/__init__.pyc
Binary file not shown.
Binary file added tests/test_is_rotation.pyc
Binary file not shown.