tag:blogger.com,1999:blog-5233088934192036312.post577393422881740677..comments2024-01-31T08:59:57.150+02:00Comments on Keep Learning: Suffix Trees: Longest Common Substring and Diff ImplementationIllya Havsiyevychhttp://www.blogger.com/profile/00309160215815501585noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5233088934192036312.post-5387002620016687402016-05-11T03:06:53.973+03:002016-05-11T03:06:53.973+03:00I can't download source code LCS now. could yo...I can't download source code LCS now. could you reupload the file attachment in another online repository, please ?Akip Maulanahttps://www.blogger.com/profile/17650426910205228958noreply@blogger.comtag:blogger.com,1999:blog-5233088934192036312.post-5767975247308008272012-02-16T01:03:39.941+02:002012-02-16T01:03:39.941+02:00This code also throws exception:
String[] fourChar...This code also throws exception:<br />String[] fourChars={"a","b","c","d"};<br /> String[] genes= {"", "", "", "", "", "", "", "", "", ""};<br /> for(int j = 0; j < genes.length; j++) {<br /> for(int i = 0; i < 2 ; i++){<br /> genes[j] += fourChars[(int)(Math.random() * 4)];<br /> }<br /> System.out.print(j);<br /> System.out.println(": " + genes[j]);<br /> }<br /> char[] terminators = {'#', '~', '@', '%', '^', '&', '$', '*', '(', '_'};<br /> GeneralizedSuffixTree gst = new GeneralizedSuffixTree(genes, terminators);<br /> System.out.println(gst.getLcsAsString());Pixarhttps://www.blogger.com/profile/00228565748678696477noreply@blogger.comtag:blogger.com,1999:blog-5233088934192036312.post-36000964957574036872011-06-12T07:25:09.034+03:002011-06-12T07:25:09.034+03:00once suffix tree is created, how much is the time ...once suffix tree is created, how much is the time complexity to get the LCS. I read somewhere it is O(n). But I do not know how to achieve that. Can you please help me?rakeshhttps://www.blogger.com/profile/08618647944926863363noreply@blogger.comtag:blogger.com,1999:blog-5233088934192036312.post-14523540450949813322009-12-28T17:57:26.502+02:002009-12-28T17:57:26.502+02:00Longest substring doesent seem to work as expected...Longest substring doesent seem to work as expected.<br />Example:<br />String[] fourChars={"a","b","c","d"};<br /> String [] genes= new String[100];<br /> for(int j=0;j<100;j++){<br /> for(int i=0;i<1000;i++){<br /> genes[j]+=fourChars[(int)(Math.random()*4)];<br /> }<br /> System.out.println(genes[j]); <br /> }<br /> GeneralizedSuffixTree gst = new GeneralizedSuffixTree(genes);<br /> System.out.println(gst.getLcsAsString());Bobihttps://www.blogger.com/profile/10331338725963988528noreply@blogger.com