Finding a maxima with binary search?
- From: "Digital Puer" <digital_puer@xxxxxxxxxxx>
- Date: 21 Jan 2006 00:21:57 -0800
Can someone give me a hand? Suppose I have an integer array
filled with numbers such that they start out increasing, reach a
maximum, and then decrease. I would like to find that maximum
value in the array, and I think that binary search is the way to go.
Can someone give me some pseudocode to help?
.
- Follow-Ups:
- Re: Finding a maxima with binary search?
- From: Ben Pfaff
- Re: Finding a maxima with binary search?
- From: Richard Harter
- Re: Finding a maxima with binary search?
- From: CBFalconer
- Re: Finding a maxima with binary search?
- Prev by Date: Re: induction
- Next by Date: Re: Finding a maxima with binary search?
- Previous by thread: Re: Why one should generally avoid certain language features (was: doubt in strcmp)
- Next by thread: Re: Finding a maxima with binary search?
- Index(es):
Relevant Pages
|