diff --git a/build.py b/build.py index e69de29..b4f3239 100644 --- a/build.py +++ b/build.py @@ -0,0 +1,21 @@ + +def is_rotation(s1, s2): + if s1 is None or s2 is None: + return False + + if len(s1) != len(s2): + return False + + if len(s1) == len(s2) == 0: + return True + + for i in range(len(s1)): + rotated = s2[i+1:] + s2[:i+1] + if rotated == s1: + return True + return False + +s1 = 'rotation' +s2 = 'tationro' + +print(is_rotation('','')) diff --git a/build.pyc b/build.pyc new file mode 100644 index 0000000..93bbe8b Binary files /dev/null and b/build.pyc differ diff --git a/tests/__init__.pyc b/tests/__init__.pyc new file mode 100644 index 0000000..c3f45b6 Binary files /dev/null and b/tests/__init__.pyc differ diff --git a/tests/test_is_rotation.pyc b/tests/test_is_rotation.pyc new file mode 100644 index 0000000..5391447 Binary files /dev/null and b/tests/test_is_rotation.pyc differ