|
If an item is suppose to be inserted into a given location and something is already there do you want us to shift the entries around if there is free space ... ?Yes. That's the usual meaning of ``insert,'' and really the only thing that's vaguely useful here. Otherwise, you'd only be able to insert names that are bigger than all the ones already in the directory. Insertion fails only if you're out of space. The moving of items during insertion is where you'll notice the structural difference between the parallel arrays and the array of records. The difference won't look dramatic in this little exercise, but you should imagine how much worse it could be if there were lots of other operations that moved directory entries around. Mike O'D. |
ok, can we sort? by Gary Yeung, 2000, Oct 29
Why sort when you don't have to? by Mike O'Donnell, 2000, Oct 29
to: