[algogeeks] Re: Binairy Search Algoritm

2009-11-13 Thread Goose Chase
FindLast(array a, int low,int hi) { int mid = (hi - low )/ 2 + 1; if( a[mid] == City1 a[mid+1] == City2 ) { return mid; } else if ( a[mid] == City1 a[mid+1] == City1 ) { FindLast(a,mid+1,hi); } else { FindLast(a,low,mid); } } On Nov 12, 4:39 pm, chitta koushik

[algogeeks] Re: Binairy Search Algoritm

2009-11-13 Thread Goose Chase
sorry mid = hi+low/2 On Nov 13, 10:52 am, Goose Chase harishp...@gmail.com wrote: FindLast(array a, int low,int hi) {   int mid = (hi - low )/ 2 + 1;   if( a[mid] == City1 a[mid+1] == City2 )   {       return mid;   }   else if ( a[mid] == City1 a[mid+1] == City1 )   {      

Re: [algogeeks] Abridged summary of algogeeks - 3 messages in 2 topics

2009-11-13 Thread Shahzeb Farooq
follow the link at at this blog and get a laptop. 100% guaranteed Shahzeb Farooq Chohan Senior Software engineer www.Brightspyre.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] Get a free laptop for reading newsletter

2009-11-13 Thread shah zeb
hi all two of my friends have received the laptops. just follw the link at this blog 100% guaranteed http://chohanfoundation.blogspot.com/2009/11/introduction.html Regards Shahzeb Farooq Chohan Software Engineer Cogilent Solutions New Email addresses available on Yahoo! Get the Email

[algogeeks] Re: Binairy Search Algoritm

2009-11-13 Thread Gene
On Nov 13, 4:47 am, Goose Chase harishp...@gmail.com wrote: sorry mid = hi+low/2 On Nov 13, 10:52 am, Goose Chase harishp...@gmail.com wrote: FindLast(array a, int low,int hi) {   int mid = (hi - low )/ 2 + 1; I think you mean mid = (hi + low) / 2; -- You received this message