Linear probing is used to insert values into a doubly linked list. is a method o
ID: 3843207 • Letter: L
Question
Linear probing is used to insert values into a doubly linked list. is a method of resolving collisions which uses chaining in a hash table. searches linearly thru the table starting at the location specified by the hash function. none of the above. A data structure which exhibits LIFO behavior is known as An array. A stack. A vector. None of the above. 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? if ((back + 1)% SIZE = front) the queue would be full if (front + 1)%SIZE = back) the queue would be full if ((back + 1) == front the queue would be full if ((front + 1) == back) the queue would be full In an array-based heap, assuming heap entries start at index 1, the right child of node n is at index 2n n n/2 2n+1 n/2 In quick sort, the partition step takes most ___________ comparisons for n items. n n/2Explanation / Answer
7. Linear probing
Ans: b.is a method of resolving collisions which uses chaining in hash table.
8. A data structure which exibits LIFO behavior is known as
Ans: A stack.
9. Ans: b.if((front+1)%size == back) the queue would be full.
10.In the array based heap assuming heap start at index 1 the right child of node n is at index
Ans: a. 2n
Solution: If the index starts at '0' and parent node is stored at index n, then right child is (2*n + 2)
But given that index starts at '1', then
=> (2(n-1+2))
=> 2n.
11.In quick sort the partition step takes at most - comparisons for n items
Ans:n/2
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.