Re: Binary Search
- From: "Sandeep" <sandeepsinghal@xxxxxxxxx>
- Date: 30 Oct 2005 07:24:11 -0800
>>Could Someone tell me Where can I get The result though the Binary
>>Search
>>eg.
>>max , min , mid ,want;
>>While ( max > min )
>>{
>>mid = (min + max )/2 ;
>>if ( mid > want ) max = mid + 1;
>>else min = mid -1 ;
>>Line1 :
>>}
>>Line2 :
>>Where can I get the correct result ? Line1 or Line2 ?
The best way to answer these questions is to take a sample ( an array
and a key in this case ), and then run through your algorithm/code for
both positive and negative cases.
.
- References:
- Binary Search
- From: willamette3597@xxxxxxxxx
- Binary Search
- Prev by Date: Re: pls expand this macro
- Next by Date: Re: Order of evaluting functions ?
- Previous by thread: Binary Search
- Next by thread: pls expand this macro
- Index(es):