Hi! I wrote the following piece of code to test my trie: int mark=0; for(int i=0; i { mark = parser.search("are",mark+1); System.out.println("Search of are:"+mark); } mark = parser.search("are",mark+1); System.out.println("Search of are:"+mark); System.out.println("Index,count:"+mark+","+parser.count("are")); Is it ok that he starts searching from the beginning again, after he went through all the occurences of are? I guess it sometimes happpens that there are two "are"s on one line. Last lines of output that I get: -1 18 20 21 52 55 176 Index,count:176,376
Thank you
Sebastian |