Binary search: Difference between revisions

Content deleted Content added
added invariants
Line 1,744: Line 1,744:
=={{header|PARI/GP}}==
=={{header|PARI/GP}}==
Note that, despite the name, <code>setsearch</code> works on sorted vectors as well as sets.
Note that, despite the name, <code>setsearch</code> works on sorted vectors as well as sets.
<lang>setsearch(s)</lang>
<lang parigp>setsearch(s, n)</lang>


=={{header|Pascal}}==
=={{header|Pascal}}==