Skip to content

Instantly share code, notes, and snippets.

@astkaasa
Created April 17, 2013 18:27
Show Gist options
  • Save astkaasa/5406571 to your computer and use it in GitHub Desktop.
Save astkaasa/5406571 to your computer and use it in GitHub Desktop.
problem 1.8
public static void main( String[] args ) {
String s11 = s1 + s1;
if ( isSubstring( s11, s2 ) )
System.out.println( "s2 is a rotation of s1.");
else
System.out.println( "s2 is not a rotation of s1." );
}
//check if s2 is a substring of s1
public static boolean isSubstring( String s1, String s2 ) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment