10. Hashing Collision

Descripción

Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU
Mena Sargios
Test por Mena Sargios, actualizado hace más de 1 año
Mena Sargios
Creado por Mena Sargios hace alrededor de 8 años
307
0

Resumen del Recurso

Pregunta 1

Pregunta
Which probing applies a hash function until it finds an empty space or the key that is sought for?
Respuesta
  • Linear
  • none of the above

Pregunta 2

Pregunta
What does separate chaining allow for in the case of collisions?
Respuesta
  • Allows the hash table to accommodate more than one item in the same location
  • none of the above

Pregunta 3

Pregunta
Pick a correct example of Quadratic Probing increments:
Respuesta
  • A) 1, 2^2, 3^3, etc
  • B) 2^0, 2^1, 2^2, etc
  • C) 1^2, 2^2, 3^2, etc
  • D) 1^1, 2^2, 3^3, etc

Pregunta 4

Pregunta
What are two ways to handle hashing collisions?
Respuesta
  • 1.Move down one at a time till a free space is found. 2.Move down n^2 where n is how many times you have collided and moved.
  • none of the above

Pregunta 5

Pregunta
what is a hash collision?
Respuesta
  • A,two distinct pieces of data have the same hash value
  • B.two distinct pieces of data have the different hash value
  • C.it hold 3 values at once
  • D.none of the above

Pregunta 6

Pregunta
Separate Chaining allows the hash table to accommodate more than one item in the same location.
Respuesta
  • True
  • False

Pregunta 7

Pregunta
Double Hasing uses two has functions what does each do?
Respuesta
  • one specifies the first location, the other gives the step size.
  • none of the above

Pregunta 8

Pregunta
Which type of probing searches the hash table at the beginning at the original specified by the hash function and continuing at increments of 1^2, 2^2, 3^2, ...?
Respuesta
  • A) Linear Probing
  • B) Square Probing
  • C) Polynomial Probing
  • D) Quadratic Probing

Pregunta 9

Pregunta
What does Separate Chaining do?
Respuesta
  • Allows the hash table to accommodate more than one item in the same location (each location is a linked list). This makes the hash table dynamic
  • none of the above

Pregunta 10

Pregunta
What searches the hash table sequentially, starting from the original locatiom specified by the hash function?
Respuesta
  • A. Linear Probing
  • B. Bilinear Probing
  • C. Circular Probing
  • D. Alien Probing

Pregunta 11

Pregunta
What is separate chaining?
Respuesta
  • A) Each location in a hash table is a linked list. Effectively, it's dynamic.
  • B) Making each has table a linked list
  • C) None of the above

Pregunta 12

Pregunta
Which of the following is NOT a type of collision handling?
Respuesta
  • A. Separate chaining
  • B. Linear probing
  • C. Double Hashing
  • D. Trigonometic probing

Pregunta 13

Pregunta
In separate chaining, what is the load factor?
Respuesta
  • A. the load factor is the average length of all the lists, including the lists with the length of zero
  • B. the load factor is the shortest length of all the lists, including the lists with the length of zero
  • C. the load factor is the longest length of all the lists, including the lists with the length of zero
  • D. the load factor is the average length of all the lists, excluding the lists with the length of zero

Pregunta 14

Pregunta
When using separate chaining for collision handling in a hash table the load factor is the average length of all of the list.
Respuesta
  • True
  • False

Pregunta 15

Pregunta
collision resolution schemes that probe for an empty, or open, location in the hash table
Respuesta
  • True
  • False

Pregunta 16

Pregunta
What is the difference between separate chaining and open addressing?
Respuesta
  • Separate chaining uses linked lists as each index of the has table, and pushes older entries back from the front when new entries are provided. Open adressing uses two types of probing (linear and quadratic) to find an open location within the hash table.
  • none of the above
Mostrar resumen completo Ocultar resumen completo

Similar

2. Red Black Tree
Mena Sargios
12. Graph Traversal
Mena Sargios
5. B-Tree
Mena Sargios
7. Algorithm Growth Rate
Mena Sargios
3. 2-3 Tree
Mena Sargios
16. Greedy Algorithm (Huffman code)
Mena Sargios
4. 2-3-4 Tree
Mena Sargios
14. Graph Shrtest Path
Mena Sargios
1. Trees Splay Trees
Mena Sargios
15. Graph Spanning Tree
Mena Sargios
13. Graph Topoligical Sorting
Mena Sargios