Define each of the following terms:

a) Collection
b) Collections
c) Comparator
d) List
e) load factor
f) collision
g) space/time trade-off in hashing
h) HashMap

a) Interface Collection is the root interface in the collection hierarchy from which in- terfaces Set, Queue and List are derived.
b) Class Collections provides static methods that manipulate collections polymor- phically. These methods implement algorithms for searching, sorting, and so on.
c) An interface that specifies how collections objects are ordered.
d) An interface implemented by ordered collections that allow duplicate elements (se- quences), such as ArrayList, LinkedList and Vector.
e) The ratio of the number of occupied cells in a hash table to the size of the hash table.
f) A situation where two different keys hash into the same cell.
g) When the load factor is increased, the result is better memory utilization. However, the program runs slower due to increased hashing collisions.
h) Java utilities package class that enables programmers to use a hash table to store key/ value pairs. Unlike Hashtable, it is not synchronized and permits null keys and values.

Computer Science & Information Technology

You might also like to view...

Comments can easily be modified

Indicate whether the statement is true or false

Computer Science & Information Technology

Which statement is false?

a) Each function should be limited to performing a single, well-defined task. b) If you cannot choose a concise name that expresses what a function does, it’s possible that the function is attempting to perform too many diverse tasks. c) Every function should be broken into smaller functions. d) A function’s parameters are local variables.

Computer Science & Information Technology