Algorithms and OOD (CSC 207 2014F) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [Learning Outcomes] [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Readings]
Reference: [Student-Curated Resources] [Java 8 API] [Java 8 Tutorials] [Code Conventions]
Related Courses: [CSC 152 2006S (Rebelsky)] [CSC 207 2014S (Rebelsky)] [CSC 207 2014F (Walker)] [CSC 207 2011S (Weinman)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)] [Issue Tracker (Textbook)]
Overview
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
SortedListinterface.
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.