Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Array, element inside limits

by RMGir (Prior)
on Jun 15, 2009 at 16:07 UTC ( #771702=note: print w/replies, xml ) Need Help??


in reply to Array, element inside limits

First, don't use $a and $b in your actual code, unless you're in a sort block. They're semi-reserved names.

Second, it sounds like simply binary searching your array for your upper bound and finding the first value less than that upper bound should get you your answer, as long as it's greater than your lower bound. No?


Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771702]
help
Chatterbox?
[LanX]: no already the pm code I'm allowed to see ... http://www. perlmonks.net/ index.pl?node_id= 1203338;style=css
[LanX]: understanding this code is like relearning space invaders and donkey Kong at the same time
[holli]: i saw that thread and figured it`s OPP value too high. i didnt realise its PM code
[LanX]: its the style attribute, I can't show you pm code, can only link to old everything docs of you want

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2017-11-20 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (294 votes). Check out past polls.

    Notices?