Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 04-03-2019, 11:05 PM   #1
rajshreedixit01
Registered User
 
Join Date: Sep 2015
Posts: 483
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 ?
__________________

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.
rajshreedixit01 is offline   Reply With Quote

Old 04-23-2019, 02:57 AM   #2
travelowebseo
Registered User
 
Join Date: Sep 2017
Posts: 224
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.
travelowebseo is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which strings are best for soprano ukulele? maria.smith Web Promotion 0 06-13-2018 10:58 PM
Violin Strings and Cello Strings Online william scott General Discussion 1 01-01-2018 11:51 PM
Want to know the possible ways to Check Irctc or Indian Railways PNR Status? jo.martin0007 General Discussion 1 06-15-2015 10:28 AM
Check Cashing david980john General Discussion 0 01-25-2014 10:57 PM
Check garbage links in the website china-jewels Web Promotion 1 11-26-2012 01:27 AM


All times are GMT -7. The time now is 01:57 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.