12.05.2015 Views

type - David Vernon

type - David Vernon

type - David Vernon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Object-Oriented Programming<br />

A Class for Sets - Application<br />

int binsearch(int x, int *a, int n)<br />

/* The array a[0], ... , a[n-1] is searched for x<br />

Return value:<br />

0 if n == 0 or x a[n-1]<br />

i if a[i-1] < x 1)<br />

{ m = (l + r)/2;<br />

(x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!