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
26 changes: 26 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@


def is_rotation(src, dest):

if(src == dest):
return True

if src is None or dest is None:
print 'None check'
return False

if len(src) != len(dest):
print 'length'
return False

for x in range(0,len(src)):
s = src[x+1:]+src[0:x+1]
print s

if s == dest:
return True

return False

print is_rotation('abcd' , 'cdab')
#print len('')
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.