[algogeeks] Re: Longest Common Subsequence

2010-08-18 Thread vinodh kumar
heh could u explain the question with a example..??!! On Aug 18, 8:47 pm, ♪ ѕяiηivαѕαη ♪ <21.sr...@gmail.com> wrote: > Hi.. >  Can anyone here explain me /provide me with an algorithm/source code in C > which efficiently finds out the *longest common substring in the given > string??* -- You rec

[algogeeks] Re: Length of Linked List with Cycle

2006-07-21 Thread Vinodh Kumar
The loop is at the end as you have said. --~--~-~--~~~---~--~~ 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 e

[algogeeks] Re: Length of Linked List with Cycle

2006-07-21 Thread Vinodh Kumar
To  find the length of the loop:1)You know the node where the two pointers have met.(say NodeX)2)Now make one pointer alone traverse through the loop.(Have a counter which increments for every move)3)It will come back to the same node (NodeX) after making 'length of the loop' jumps ie the counter g

[algogeeks] Re: find the most occured (more than N/2 times , where N is the length of the array) element in an array

2006-06-20 Thread Vinodh Kumar
>>sorry i forgot to mentioned>>that array may or may not have a majority element. If the array may or may not contain the majority element, then after the last step(ie once you get the get the array with one element) , just iterate thru the original array once counting the number of occurences of t

[algogeeks] Re: find the most occured (more than N/2 times , where N is the length of the array) element in an array

2006-06-20 Thread Vinodh Kumar
 Yes , this will work.Here there are nine elements :So after pairing , you get3,1  3,2  3,4 3,5 3The first four pairs donot yield anything.The last lone element 3 is alone taken which is infact the majority of the the array.  I would also like to eloborate what Karthik had said:From the first array

[algogeeks] Re: E-book needed

2006-03-07 Thread Vinodh Kumar
Hi jatin,  why not send the  book to the group vinodh --~--~-~--~~~---~--~~ 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

[algogeeks] Re: Finding Repeated and Missing Numbers

2006-01-01 Thread Vinodh Kumar
  Hi,   I  think there is a small modification in the equations :   X= (D2 + D1^2)/(2*D1)   Y= (D2 - D1^2)/(2*D1)   Vinodh