SUNY Geneseo Department of Mathematics
Friday, May 1
Math 384
Spring 2015
Prof. Doug Baldwin
fib( n )
if n == 0 return 0
else if n == 1 return 1
else return fib(n-1) + fib(n-2)
search( T, (x,y,z) )
if T has 0 points
return “failure”
else if T has 1 point equal to (x,y,z)
return info about point
else if T has 1 point not equal to (x,y,z)
return “failure”
else if x <= boundary
search( left, (x,y,z) )
else
search( right, (x,y,z) )
... similar code for searching based on y and z, depending on how tree is split ...
(No Next Lecture)