Feedback Empty array yes, special case no 

Forum: U Chicago, Com Sci 221 old messages, autumn 2000
Re: News Assignment #4, due 25 October (Mike O'Donnell)
Re: Question Assignment #4, empty list (Christopher Hudzik)
Date: 2000, Oct 19
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

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.


Messages

1. Question representing the empty array by Michael C. Brizic, 2000, Oct 23
(_ Feedback You choose the representation by Mike O'Donnell, 2000, Oct 23

to: "Empty array yes, special case no"