Mena Sargios
Quiz by , created more than 1 year ago

Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU

18
0
0
Mena Sargios
Created by Mena Sargios almost 8 years ago
Close

9. Hashing Intro

Question 1 of 17

1

What symbol is used to represent Load Factor and give the equation for determining Load Factor?

Select one of the following:

  • Alpha, (current number of hash items) / (table size)

  • none of the above

Explanation

Question 2 of 17

1

What is the hash function's (h(x)) functionality?

Select one of the following:

  • Maps the search key of an item to a location

  • none of the above

Explanation

Question 3 of 17

1

A good hash function places items ____ throughout the
the hash table.

Select one of the following:

  • A) every other level

  • B) at every odd position

  • C) evenly

  • D) The hash function does not place items on the table.

Explanation

Question 4 of 17

1

What is hashing?

Select one of the following:

  • The use of a hash table to determine whether variables have been stored/accesed and allows for quicker searching.

  • none of the above

Explanation

Question 5 of 17

1

what is not good thing for hash function to have?

Select one of the following:

  • A.places items evenly throughtout the hash table

  • B.use a prime base

  • C,has no search key

  • D.none of the above

Explanation

Question 6 of 17

1

a Hash table is an array that contains items, assigned by a hash function

Select one of the following:

  • True
  • False

Explanation

Question 7 of 17

1

what is Hash table?

Select one of the following:

  • An array that contains items, assigned by a hash function.

  • none of the above

Explanation

Question 8 of 17

1

How do you determine the load factor of a hash table?

Select one of the following:

  • (current number of hash items)/(table size)

  • none of the above

Explanation

Question 9 of 17

1

Which of the following is not a requirement for a good hash function?

Select one of the following:

  • 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

Explanation

Question 10 of 17

1

Which one is NOT a requirement for a good has function?

Select one of the following:

  • 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

Explanation

Question 11 of 17

1

An array that contains items, assinged by a hash function is called

Select one of the following:

  • A. Hash function

  • B. Hash table

  • C. Hash Brown

  • D. None of the above

Explanation

Question 12 of 17

1

What is a hash table?

Select one of the following:

  • 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.

Explanation

Question 13 of 17

1

Which of the following is NOT a good requirement for a hash function?

Select one of the following:

  • A. Fast and easy to compute

  • B. O(nlogn) lookup time

  • C. places items evenly

  • D. involves the entire search key

Explanation

Question 14 of 17

1

What are the requirements for a good hash function?

Select one of the following:

  • 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

Explanation

Question 15 of 17

1

Which of the following is a requirement for a good hash function?

Select one of the following:

  • A.Fast to compute

  • B.Places items randomly throughout the hash table

  • C.Involves parts of the search key

  • D.All of the above

Explanation

Question 16 of 17

1

Which statement is NOT true?

Select one of the following:

  • 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

Explanation

Question 17 of 17

1

What is the difference between a Perfect hash function and a Unifrom hash function?

Select one of the following:

  • 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

Explanation