Finding a maxima with binary search?



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?

.



Relevant Pages

  • Re: Finding a maxima with binary search?
    ... Suppose I have an integer array ... >maximum, and then decrease. ... and I think that binary search is the way to go. ... Initializing the iteration and spelling out termination conditions is ...
    (comp.programming)
  • Re: Integer array as BLOB
    ... I think you could just typecast the integer array as a byte array when you ... call the BLOB read and write function. ... Prev by Date: ...
    (borland.public.delphi.database.ado)
  • puzzle
    ... ok here is a puzzle. ... there is an integer array whose length is odd, ... Prev by Date: ...
    (comp.lang.c)
  • puzzle
    ... ok here is a puzzle. ... there is an integer array whose length is odd, ... Prev by Date: ...
    (comp.programming)
  • Re: integer array to a byte array
    ... >>> how do i convert an integer array to a byte array?? ... >> If replying to the group, please do not mail me too ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)