Post by Pavel PetrenkoFor problem 2, part (a) and part (f), do we need to provide pseudo code?
Read the top of the assignment.
Post by Pavel PetrenkoPart (a) ask us to briefly describe an algorithm. I am unsure how brief
we need to be. For part (f), it asks us to give a high-level description
for an algorithm. Again, what does a high-level description consist of?
The point is just to communicate the idea of your algorithms, and
convince the marker that you understand what to do. You do not need to
provide all the details in pseudocode. However, I emphasize that it
should be completely clear to the markers what your algorithm is doing.
If you are unsure, you can always provide more details to be safe.
For instance, a brief, high-level description of the normal skip-search
algorithm might be:
"Starting at the very left of the top list (L_h, where h is the height
of the skip-list), perform a linear search in this list to find all keys
that are less than k in this level. At the last key less than k, drop
down to the level below, and perform another linear search in the list
below. Keep performing drop-downs and linear searches on each level
until we reach the bottom level, L_0. Then return a stack containing the
last node less than k in each level, with the last node less than k in
L_0 at the top of the stack."
Note that this is a less detailed version than the pseudo-code in the
slides, but it still very clearly (I think) communicates what the
algorithm does, so that anyone familiar with the skip-list data
structure could understand it.
Post by Pavel PetrenkoAlso, when will the public tests be available?
(I'll leave this for Patrick.)
-Dan Roche
CS 240 Instructor, Section 003