How do you check if two strings are a rotation of each other ?
Hello Dear,
Please Tell How do you check if two strings are a rotation of each other ? |
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. |
All times are GMT -7. The time now is 09:32 PM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.