In a really well crafted program, the empty case will always be handled uniformly with other cases. If you think that the empty array needs to be a special case (say, in a separate branch of an outermost if), then you probably haven't conceived the problem in the best way. Notice that the empty case should occur at the end of every computation where the element searched for is not found. Mike O'D. |
representing the empty array by Michael C. Brizic, 2000, Oct 23
You choose the representation by Mike O'Donnell, 2000, Oct 23
to: