Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Binary search

by GrandFather (Saint)
on Oct 26, 2005 at 20:24 UTC ( [id://503154]=CUFP: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    return $item <=> $target;
    }
    
  2. or download this
    1, 3, 5, 8, 10
    Found 10 at 4
    ...
    Found 5 at 2
    Found 8 at 3
    Found 9 at 3.5
    
  3. or download this
    sub BinSearch
    {
    ...
        }
      }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-26 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found