Created
April 17, 2013 18:27
-
-
Save astkaasa/5406571 to your computer and use it in GitHub Desktop.
problem 1.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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