Algorithms and OOD (CSC 207 2013F) : EBoards

# CSC207.01 2013F, Class 48: Hash Tables, Continued

Overview

• Preliminaries.
• Quick exam comment.
• Questions.
• Lab.

## Preliminaries

• Does anyone know why there's a drawing of a naked alien on the board? (Odie seems to like it alot.)
• As much as it will probabably upset certain alums, I'm giving you until Friday at 2pm for submitting the electronic version of the exam. You can turn in the academic honesty statement on Monday.
• Upcoming extra credit opportunities:
• Any self-care week activity
• One Grinnell rally on December 4 at 4pm (unless you are taking photos).
• And yes, I've sent a note to Dean Arora about the scheduling.

### Quick exam comment

In spite of a curriculum that emphasizes recursion, you folks are much too reluctant to use recursion. How recursion helps with `remove`

`````` Node remove(key, Node here)
// Case: Nothing left
return null;

// Case: Keys match
...
return recomputedTree;

// Case: Key is less than here.key
here.smaller = remove(key, here.smaller);
return here;

// Case: Key is bigger than here.key
here.larger = remove(key, here.larger);
return here;
``````

One of the many things you didn't learn in 161

``````  x = foo ? bar : baz;
``````

This is the legendary C "conditional expression".

• Evaluate foo
• If foo holds, the expression has the value of bar
• If foo does not hold, the expression has the value of baz

## Lab

Copyright (c) 2013 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit `http://creativecommons.org/licenses/by/3.0/` or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.