Link to home
Start Free TrialLog in
Avatar of jl66
jl66Flag for United States of America

asked on

How to binary search the ordered list in Perl

Want to binary search an ordered list. Can it be coded in Perl or someone points to a link to me?
For example,
list: (2, 100, 1000, 4001, 10001, ...)
Want to find the closest number from left in the list to 7000, which is 4001.
SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial