public static int bruteForce(String pattern, String docs) {
		
		int M = pattern.length();
		int N = docs.length();
	
		for (int i = 0; i < N - M; i ++) {
			int j;
			
			for (j = 0; j < M; j++) 
				if (pattern.charAt(j) != docs.charAt(i + j)) break;
			
			if (j == M) return i;
		}
	
		return N;
	}