Question
5. Linear probing a. is used to insert values into a doubly linked list. b. is a method of resolving collisions which uses chaining in
5. Linear probing
a. is used to insert values into a doubly linked list.
b. is a method of resolving collisions which uses chaining in a hash table.
c. searches linearly thru the table starting at the location specified by the hash function.
d. none of the above.
6. A data structure which exhibits LIFO behavior is known as
a. An array.
b. A stack.
c. A vector.
d. None of the above.
7. Assume we have a queue implementation which is based on using an array. We have front and back variables which identify the positions in the array where items are removed or added. The size of the array is defined by a constant named SIZE. The queue is defined to be empty when front == back. When adding an item to this queue, how would you tell when the queue was full?
a. if ((back + 1)% SIZE == front) the queue would be full
b. if ((front + 1) % SIZE == back) the queue would be full
c. if ((back + 1) == front) the queue would be full
d. if ((front + 1) == back) the queue would be full
8. In quick sort, the partition step takes at most ______ comparisons for n items.
a. n
b. n/2
c. 2n
d. logn
e. n2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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