private static boolean kmpSearch(String s, String w) {
		int m = 0;
		int i = 0;
		int[] t = kmpTable(s);
		
		while (m+i < s.length()) {
			if (w.charAt(i) == s.charAt(m+i)) {
				if (i == w.length()-1) {
					return true;
				}
				i++;
			} else {
				m = m + i - t[i];
				if (t[i] > -1) {
					i = t[i];
				} else {
					i = 0;
				}
			}
		}
		return false;
	}