Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MC questions about programming ( java language ) and algorithm. Why does searching a lookup table take O(1) time? Select one: a. because we only
MC questions about programming ( java language ) and algorithm. Why does searching a lookup table take O(1) time? Select one: a. because we only need to scan the whole table once b. because we only need to check the content of one cell of the table c. because it stores integer constants You want to search a value in the following array: Which searching algorithm will perform best? Select one: a. Linear search b. Binary search Why can collisions happen in a hash table? Select one: a. because the hash function may map the same value to two buckets b. because the hash function may map two values to the same bucket c. because the hash function may not be surjective A hash table of size 8 uses the following hash function Suppose it already contains the integer 5 . What happens when we insert 13? Select one: a. 13 is added to the list in the same bucket as 5 b. 13 is put in the bucket of 5 , replacing it c. 13 is stored into an empty bucket For each of the following statements, select which data structure it applies to: it stores a value in the bucket obtained by hashing its key it associates keys to values it implements a set of unique elements
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started