Hi,
I have an assignment for my computer science 1 class I could really use some help on. Here's exactly what it says:
Assume you have a method isSubstring which checks if one word is a substring of another, ex: isSubstring("water", "ter") returns true.
Given two strings s1 and s2, write code to check if s2 is a rotation of s1 using isSubstring, ex: "waterbottle" is a rotation of "erbottlewat"
I figured a way to put all the characters into an array and then just shuffle the order one letter at a time and compare that to the original. Problem is that the code has to use the isSubstring method mentioned. Any ideas?