Determine if a string s1 is a rotation of another string s2, by calling (only once) a function is_rotation.
- Can we assume the string is ASCII?
- Yes
- Note: Unicode strings could require special handling depending on your language
- Is this case sensitive?
- Yes
- Can we use additional data structures?
- Yes
- Can we assume this fits in memory?
- Yes
Instructions:
-
Program should be written in file build.py
-
Function name should be is_rotation.
-
Input
Type: String Value: s1 = 'hello' s2 = 'ohleol'
-
Expected Output
Type: Boolean Value: False