[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] frequent substring

2006-04-24 Thread iwgmsft
Write a function that determines the most frequent 3 character strings in an otherwise random string of one million characters. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

[algogeeks] find pair in O(N)

2006-04-21 Thread iwgmsft
one of microsoft interview questionif anybody interested in given array int num[10]={1,-5,6,7,9,9,20,25,31,45} it is a sorted array. write a function void findsum(int [],int x) int [] is array and x is number. function should print all possible pair of elements in array that can make a

[algogeeks] Re: find pair in O(N)

2006-04-21 Thread iwgmsft
thanks. it works. --~--~-~--~~~---~--~~ 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: I guess, It is a tough one!!! Lets see who solves this

2006-04-03 Thread iwgmsft
assume we have set {ai+bj}.. of size n^2 we can solve using MERGE-SORT i think.. to divide this problem into subproblems will take O(2logn) i.e. O(log n)... now at the time of merge it will take O(2n) i.e. O(n)... so this time we can find n largest values(by merging values in decending order)..