Hi,
Check if the length of both Strings is same or not, If not then they are not rotation.
Check if both Strings are equal, if yes then strings2 is a rotation of strings1.
Take the first string's first character and find the index in the second string.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|