9. Hashing Intro

Beschreibung

Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU
Mena Sargios
Quiz von Mena Sargios, aktualisiert more than 1 year ago
Mena Sargios
Erstellt von Mena Sargios vor etwa 8 Jahre
18
0

Zusammenfassung der Ressource

Frage 1

Frage
What symbol is used to represent Load Factor and give the equation for determining Load Factor?
Antworten
  • Alpha, (current number of hash items) / (table size)
  • none of the above

Frage 2

Frage
What is the hash function's (h(x)) functionality?
Antworten
  • Maps the search key of an item to a location
  • none of the above

Frage 3

Frage
A good hash function places items ____ throughout the the hash table.
Antworten
  • A) every other level
  • B) at every odd position
  • C) evenly
  • D) The hash function does not place items on the table.

Frage 4

Frage
What is hashing?
Antworten
  • The use of a hash table to determine whether variables have been stored/accesed and allows for quicker searching.
  • none of the above

Frage 5

Frage
what is not good thing for hash function to have?
Antworten
  • A.places items evenly throughtout the hash table
  • B.use a prime base
  • C,has no search key
  • D.none of the above

Frage 6

Frage
a Hash table is an array that contains items, assigned by a hash function
Antworten
  • True
  • False

Frage 7

Frage
what is Hash table?
Antworten
  • An array that contains items, assigned by a hash function.
  • none of the above

Frage 8

Frage
How do you determine the load factor of a hash table?
Antworten
  • (current number of hash items)/(table size)
  • none of the above

Frage 9

Frage
Which of the following is not a requirement for a good hash function?
Antworten
  • A) Fast (and easy) to compute
  • B) Places items evenly throughout the hash table
  • C) Involves the entire search key
  • D) Uses a non-prime base, if it uses modulo arithmetic

Frage 10

Frage
Which one is NOT a requirement for a good has function?
Antworten
  • a. Fast and easy to compute
  • b. Involves entire search key
  • c. Use a prime base if it uses any arithmetic
  • d. Items placed evenly throughout the hash table

Frage 11

Frage
An array that contains items, assinged by a hash function is called
Antworten
  • A. Hash function
  • B. Hash table
  • C. Hash Brown
  • D. None of the above

Frage 12

Frage
What is a hash table?
Antworten
  • A) An array that contains items, assigned by a hash function.
  • B) A perfectly cooked pile of potatoes
  • C) A table of hash signs (#)
  • D) None of the above.

Frage 13

Frage
Which of the following is NOT a good requirement for a hash function?
Antworten
  • A. Fast and easy to compute
  • B. O(nlogn) lookup time
  • C. places items evenly
  • D. involves the entire search key

Frage 14

Frage
What are the requirements for a good hash function?
Antworten
  • A. fast and easy to compute
  • B. places items evenly throughout the hash table
  • C. involves the entire search key and uses a prime base, if it uses modular arithmetic
  • D. All of the above

Frage 15

Frage
Which of the following is a requirement for a good hash function?
Antworten
  • A.Fast to compute
  • B.Places items randomly throughout the hash table
  • C.Involves parts of the search key
  • D.All of the above

Frage 16

Frage
Which statement is NOT true?
Antworten
  • a. hash table : an array that contains items, assigned by a hash function
  • b. perfect hash function : maps each search key to a unique location
  • c. collision : occurs when the hash function maps 2+ items to the same location
  • d. collision : occurs when the hash function maps not 2+ items to the same location

Frage 17

Frage
What is the difference between a Perfect hash function and a Unifrom hash function?
Antworten
  • A Perfect hash function maps each key to a unique location. While a Uniform hash function is equally likely to map a key to any index in the table.
  • none of the above
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

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
10. Hashing Collision
Mena Sargios
14. Graph Shrtest Path
Mena Sargios
1. Trees Splay Trees
Mena Sargios
15. Graph Spanning Tree
Mena Sargios