jl66
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.