Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Data Structures: ?Please answer #10-12 ASAP! Inserting into a binary heap takes

ID: 3680331 • Letter: D

Question

Data Structures: ?Please answer #10-12 ASAP!

Inserting into a binary heap takes at most_compares with a heap of size N: logN MlogN 1 0 When working with hash tables, why is mMaxLambda required to be smaller for a probing hash table than for a separate chaining hash table? Separate chaining hash tables implement different hash functions, making them faster when searching for an element. This means a greater lambda won't make a significant difference. Probing hash tables have fewer elements, since collisions aren't handled at all. Probing hash tables are much more likely to encounter collisions, so having more elements means more space in between the elements and less chance of collision. Probing hash tables have bucket lists, so they appear to have fewer elements than separate chaining hash functions. What functions or concepts are incorporated into the quicksort algorithm? InsertionSort mySwapFH/swap Pivot element All of the above

Explanation / Answer

Question 10

Answer: logN

Explaination: As we need at most one comparision (swap) on each level of a heap on the path from the inserted node to the root, the maximum runtime(wrost case) of the algorithm is O(log n).

Question 11

Answer: Probing hash tables are more likely to encounter collisons, so having more elements means more space in between the elements and less chance of collision.

Question 12

Answer: mySwapFH/swap and pivot element

Explaination: The quick sort uses divide and conquor technique and logic is based on selecting a pivot element and then swapping of values takes place using a swap function. There is no logic of insertion sort present.