Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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


Comment on Re: Array, element inside limits

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771702]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-10-31 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (215 votes), past polls