Your question is Check String Rotation. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Datavant identity resolution workflows may compare normalized identifier strings received in different segment orders. Given two strings, determine whether the second string is a rotation of the first.
A string b is a rotation of string a if b can be produced by moving a prefix of a to its end. The rotation may move zero characters, so every string is a rotation of itself.
Implement is_rotation(a, b).
a and b, containing lowercase English letters and digits.True if b is a rotation of a; otherwise, return False.def is_rotation(a, b):