Open Address Hashmap Practice Quiz
Practice Problem
Take out a piece of paper and put your name on the upper right corner.
Write the V get(Object key) method for the following Hashmap. The Hashmap uses Open Addressing with linear probing.
public class HashmapOpen<K, V> {
private Entry<K, V>[] table;
/**
* Returns the value associated with the given key.
* @param key, the key.
* @return The value associated with the given key.
*/
public V get(Object key) {
// your code.
}
private class Entry<K,V> {
K key;
V value;
}
}
Time Remaining:
You can restart the timer by reloading the page.
Try to complete the problem in 15 minutes.
If you cannot complete the program in 15 minutes, you can watch me solve the problem in a text editor.