Code:
public class CompareStrings {
public static boolean match(String x, String y) {
return match(x.toCharArray(), y.toCharArray(), x.length() - 1, y.length() - 1);
}
private static boolean match(char[] x, char[] y, int xPosition, int yPosition) {
if (xPosition < 0 || yPosition < 0) {
return false;
Leave a comment: