Given a string s1 and a string s2, write a snippet to say whether s2 is a
rotation of s1 using only one call to strstr routine?
(eg given s1 = ABCD and s2 = CDAB, return true,
given s1 = ABCD, and s2 = ACBD , return false)
I hope this will work:
strcpy (s3,s1); //s3 = ABCDstrcat (s1,s3); // s1 = ABCDABCDthen check for strstr(s1,s2);
posted by yetanother.softwarejunk #
4:18 PM