Lecture 24 – November 21st
We went over the
heap sort algorithm again in class.
We ran my program
with debugging data and without
We talked briefly
about the binary search tree algorithms
We discussed the insertion algorithm
and how it is recursive
We discussed the different cases for
the deletion algorithm
The case where the value
(node) to be deleted is a leaf node
The case where the value to
be deleted has only one child which is a leaf
The case where the value to
be deleted has two children which are leaves
For the case where the value
to be deleted is in a node which has many descendant, you should draw many
different example trees to decide how to code it.
REQUIRED SUBMISSIONS (heap and binary
search tree)
I have extended
the deadline for submitting your heap programs which were due today.
Be sure that you
read what follows carefully before submitting or re-submitting your programs.
Your heap programs
must use my specification and should be zipped and the zip file named yourname19.zip You should submit what you ran as you tested
it including
the
usefulstuff2.ads,
the
usefulstuff2.adb,
your
test program (yourname.adb),
your
input data (input.txt)
They should be
submitted by midnight tomorrow (WEDNESDAY) with a submission
comment saying "this is my final submission for the heap program”.
Your binary search
tree programs are due at midnight on Tuesday, November 28th (the
night of the first class after break) but in order to get full credit, you must
have submitted at least an almost working program by Monday, November 27th at
midnight. The purpose of this is so that
you know where you are still having problems.
You need to use the spec found in lecture 20. You should have already submitted a stubbed
out program. This will be yourname20.zip Please mark it initial submission or final
submission in the submission comments
Here is a link to some help with deletions from Binary Search
Trees
Have a happy Thanksgiving!
Note: I will be available via e-mail over break… I
will also create a Blackboard discussion board for each of the programs so you
can ask your questions there (of me or your classmates)002E