Algorithms and OOD (CSC 207 2014F) : EBoards

CSC207.01 2014F, Class 37: An Introduction to Linear Structures


Overview

Preliminaries

Admin

Upcoming Work

Cool Upcoming Events on Campus

Extra Credit

Academic

Peer Support

Questions on the homework

Do our iterators have to work at anything other than level 0? For example, should we allow the creation of an iterator at level 1, 2, or 3?

Iterators provide information about the data to the client. The client should not have access to the underlying implementation of the structure, or even know about that implementation. Hence, you should only have one kind of iterator: the one that matchees the SortedList interface.

Should we cap the number of levels in the skip list?

I'd suggest that your constructor take the number of levels as a parameter. However, you may also limit the number of levels to 20 (which supports about 1 million items, at least if the probability is 1/2).

Can we use a fixed probability?

I'd suggest that your constructor take the probability as a parameter. However, you may also use a fixed or default probability of 1/2. (You might learn some interesting things when you use different probabilities.)

Can I make doubly-linked skip lists?

Skip lists are traditionaly singly-linked. But if you want to try to maintain both directions, you are welcome to try.

Linear structures

Stacks

An application of stacks: Matching parens

Lab