public static String[] kMismatch(String text, String pattern, int k){
		SuffixTree st = new SuffixTree(new ArrayList<String>(Arrays.asList(text,pattern)));
		List<String> res = new ArrayList<String>();
		//int j=0;//start of pattern	
		for(int i=0;i<text.length();i++){
			int counter = 0;
			int j=0;
			int temp = i;
			while(counter<=k){
				//SuffixTreeNode p = st.findNode(1,j);
				//SuffixTreeNode t = st.findNode(0,temp);
				if(temp>=text.length())
					break;
				int len = Utils.longestCommonExtention(st, 0, 1, temp, j);
				if(j+len==pattern.length()){
					res.add(text.substring(i,i+pattern.length()));
					break;
				}else{
					j=j+len+1;
					temp=temp+len+1;
					counter++;
				}
			}	
		}
		return res.toArray(new String[res.size()]);
	}