[algogeeks] Re: frequent substring

2006-04-28 Thread iwgmsft
sorry for reposting ..my mistake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to

[algogeeks] Re: frequent substring

2006-04-25 Thread shishir
sorry ! didn't get that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[algogeeks] Re: frequent substring

2006-04-25 Thread forest
Java solution: public static String f(String s) { int len = s.length(); if (len 3) return null; int[] buf = new int[256*256*256]; int cur = (s.charAt(0) 8) | s.charAt(1); ++buf[cur]; for (int i = 0;

[algogeeks] Re: frequent substring

2006-04-25 Thread forest
Java solution: public static String f(String s) { int len = s.length(); if (len 3) return null; int[] buf = new int[256*256*256]; int cur = (s.charAt(0) 8) | s.charAt(1); for (int i = 2; i len; ++i)

[algogeeks] Re: frequent substring

2006-04-25 Thread forest
Java solution: public static String f(String s) { int len = s.length(); if (len 3) return null; int[] buf = new int[256*256*256]; int cur = (s.charAt(0) 8) | s.charAt(1); for (int i = 2; i len; ++i)

[algogeeks] Re: frequent substring

2006-04-24 Thread daizi sheng
if ur chars are just alphabet! the equation 26 ^ 3 = 17576 will show u the answer 2006/4/25, iwgmsft [EMAIL PROTECTED]: Write a function that determines the most frequent 3 character strings in an otherwise random string of one million characters. -- myblog: