Question

Question 1 5 pts A binary heaps structure is an AVL tree a complete binary tree a particular case of binary search tree a sp
Question 3 5 pts In the worst case, the very best that a comparison based when sorting n records is rting algorithm can do (l
C++
0 0
Add a comment Improve this question Transcribed image text
Answer #1

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.

Add a comment
Know the answer?
Add Answer to:
C++ Question 1 5 pts A binary heap's structure is an AVL tree a complete binary...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • anvas A Question 7 5 pts A binary heap's structure is an AVL tree a particular...

    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...

    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...

    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...

    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...

    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...

    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...

    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)

  • PYTHON QUESTION... Building a Binary Tree with extended Binary Search Tree and AVL tree. Create a...

    PYTHON QUESTION... Building a Binary Tree with extended Binary Search Tree and AVL tree. Create a class called MyTree with the methods __init__(x), getLeft(), getRight(), getData(), insert(x) and getHeight(). Each child should itself be a MyTree object. The height of a leaf node should be zero. The insert(x) method should return the node that occupies the original node's position in the tree. Create a class called MyBST that extends MyTree. Override the method insert(x) to meet the definitions of a...

  • 1. [10 pts.] AVL Trees: Example Operations (a) [5 pts.] Draw the AVL tree that results...

    1. [10 pts.] AVL Trees: Example Operations (a) [5 pts.] Draw the AVL tree that results from inserting key 45 into the following AVL tree. (b) [5 pts.] Draw the AVL tree that results from deleting key 70 from the following AVL tree. NOTE: When deleting a key from an AVL tree, please follow the textbook approach of finding the node with the key using the function for standard binary search trees. If the key is in the tree and...

  • C++ Question 5 5 pts In a min-heap of N elements, if we want to find...

    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...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT