1) Answer is 2nd option - a complete binary tree.
Binary heap is data structure which is in the form of a binary tree. These binary heaps are the common way in implementing priority queue data structures. These are of the form in complete binary tree, where value of the parent node is greaterthan its left child and lessthan its right child respectively.
2) Answer is 1st option - atleast half empty.
Quadratic probing is used to reduce number of collisions in hash table. Quadratic coefficients are added into hashtable if the space in hash table is empty. If the size if table is prime, then the value is added if the table is atmost half full. It means that the table must be atleast half empty.
3) Answer is 4th option - nlogn.
Comparison based sorting algorithms are bubble sort, selection sort, merge sort, heap sort and quick sort.
Worst case time complexity are
Bubble sort - n^2
Selection sort - n^2
Merge sort - nlogn
Heap sort - nlogn
Quick sort - n^2.
So, nlogn is the best in worst time complexity in sorting. But nlogn is not present in options. So n^2 is the best worst case.
4) Answer is 3rd option - O( N+M ).
Rehashing occurs if the size of the hash table becomes full. Time complexity of hash table is N for the size, N. If new hashing table of size M is used , then its time complexity is M. So, time complexity of using N+M size is, O(N+M).
-----------
Comment if u have any doubt and upvote if u like it.
Thank you.
C++ Question 1 5 pts A binary heap's structure is an AVL tree a complete binary...
anvas A Question 7 5 pts A binary heap's structure is an AVL tree a particular case of binary search tree a complete binary tree a sparse tree Question 8 5 pts The time taken to find an element in an AVL tree of depth dis Old) Ollogd Old2) Odlog d) Question 9 5 pts Deleting the minimum element in a min-heap of Nelements takes in average case Ollog N ON 011 OIN log N
anvas A Question 7 5 pts A binary heap's structure is an AVL tree a particular case of binary search tree a complete binary tree a sparse tree Question 8 5 pts The time taken to find an element in an AVL tree of depth dis Old) Ollogd Old2) Odlog d) Question 9 5 pts Deleting the minimum element in a min-heap of Nelements takes in average case Ollog N ON 011 OIN log N
vas Х Question 1 5 Secondary clustering in a hash table occurs when using Separate chaining Double hashing Linear probing Quadratic probing Question 2 5 pt Rehashing occurs when a hash table becomes too full and we must migrate to a larger table. If we have N elements, and our new table size is M. what is the Big O time of rehashing? O(M) ON+M) ON) O(Mlog N) Question 3 5 pts When sorting n records. Merge Sort has worst-case...
C++ Question 9 5 pts Deleting the minimum element in a min-heap of N elements takes in average case O(N log N) O(1) O(N) Oſlog N) D Question 10 5 pts The time taken to find an element in an AVL tree of depth d is Old) 02) Oſlog d) Old log d) Question 11 5 pts Secondary clustering in a hash table occurs when using Linear probing Separate chaining Quadratic probing Double hashing Question 12 5 pts When sorting...
Canvas → XCO Question 4 5 pts When using a hash table with quadratic probing, and the table size is prime, then a new element can always be inserted if the table is at least half empty the table is at least half full the table is full the table is larger than any data value Question 5 5 pts The general strategy of inorder traversal is: process the left subtree, then process the current node and finally process the...
The time-complexity of searching an AVL tree is in the worst case and in the average case. On), On) O(logot). O(log O ON), C(n) 0(), O(log) Question 16 2 pts The time-complexity of searching a binary search tree is in the worst case and in the average case (1), O(log) O(logn), O(log,n) On), On) 001), 001)
rehashing occurs when a hash table becomes too full and we must migrate to a larger table. if we have N elements, and our new tables size is M, what is the big-O time of rehashing? A. O(M) B. O(N+M) C. O(N) D. O(M log N)
Figure 11-35:50/ 30 80/ / 25 40 55 98 / / 48 52 58 85 110/ 45 70 90/ 65 79/75Figure 11-37:50/ 30 80/ / 25 40 55481. Following list shows the contents of stack as we run through the non-recursive post-order traversal for the binary search tree shown in Figure 11-35:(50,1)(50,1),(30,1)(50,1),(30,1),(25,1)(50,1),(30,1),(25,2)(50,1),(30,2)(50,1),(30,2),(40,1)...What will be the contents of the stack when node 65 is visited? Note that 65 will not be in the stack when it is visited. Use the above...
C++ Question 5 5 pts In a min-heap of N elements, if we want to find the max element, we have to search all the leaves. What is the big-o running time of findMax? O(N^2) Oſlog N) O(N) OIN log N) Question 6 5 pts An AVL tree is a Binary Search Tree that has the following additional property for every node in the tree, the height of the left and right subtrees is the same none of the above...
Canvas →XC 6 D Question 10 5 pts When sorting n records, Quicksort has worst-case cost On) On 2) On logn) Olm Question 11 5 pts In the worst case, the very best that a comparison based sorting algorithm can do when sorting n records is On 2) Allog in! (n) (login) Question 12 5 pts An AVL tree is a Binary Search Tree that has the following additional property none of the above for every node in the tree....
Post an Article
Post an Answer
Post a Question
with Answer
Self-promotion: Authors have the chance of a link back to their own personal blogs or social media profile pages.