Skip to content
main-logo
  • +91 637-050-2482
  • santuitreturns@gmail.com
Menu
Menu
  • Home
  • Income Tax
    • Income From Salary
    • Profit or gain from Business/Profession.
    • Capital Gain
    • Income From Other Sources
    • 80C to 80U
    • TDS & TCS
    • ITR FORMS
  • International Taxation
    • Transfer Pricing
    • Non-Resident Taxation
    • Foreign Tax Credit (FTC)
    • Model Tax Convention
    • Base Erosion and Profit Shifting (BEPS)
  • GST
  • Accounting
  • MCQs
    • NEET
    • NEET QUIZ TEST
    • NEET PG MCQ’s
    • NEET PG QUIZ TEST
    • Civil Engineering
    • Mechanical Engineering MCQs
    • CHSL EXAM
      • Logical Reasoning
  • Others
    • Job Tips
  • CA Courses
    • CA Inter/IPCC

TOP 20+ MCQs on Binomial and Fibonacci Heap Data Structure with Answers

Posted on November 28, 2023

1. The main distinguishable characterstic of a binomial heap from a binary heap is that

a) it allows union operations very efficiently
b) it does not allow union operations that could easily be implemented in binary heap
c) the heap structure is not similar to complete binary tree
d) the location of child node is not fixed i.e child nodes could be at level (h-2) or (h-3), where h is height of heap and h>4

View Answer

Answer: a

Explanation: 

 The main use of binomial heap is to unify two different heap efficiently.

2. The number of trees in a binomial heap with n nodes is

a) logn
b) n
c) nlogn
d) n/2

View Answer

Answer: a

Explanation:

 At each depth there is a binomial tree in a binomial heap.

3. In a binomial heap the root value is greater than left child and less than right child.

a) True
b) False

View Answer

Answer: b

Explanation:

Binomial tree used in making binomial heap follows min heap property.

4. Given the pseudo code, state whether the function for merging of two heap is correct or not?
		mergeTree(p,q)
    		if p.root.value <= q.root.value
        	return p.addTree(q)
    		else
        	return q.addTree(p)

a) True
b) False

View Answer

Answer: a

Explanation:

Binomial heap has a property that root value is less than both the child node’s value. So the given function of merging two different heap is correct.

5. What is order of resultant heap after merging two tree of order k?

a) 2*k
b) k+1
c) k*k
d) k+logk

View Answer

Answer: b

Explanation:

This could be easily verified by looking at the structure of a binomial heap.

6. Time taken in decreasing the node value in a binomial heap is

a) O(n)
b) O(1)
c) O(logn)
d) O(nlogn)

View Answer

Answer: c

Explanation:

Decreasing a node value may result in violating the min property. As a result be there would be exchange in the value of parent and child which at max goes up to height of the heap.

7. What does this pseudo_code return ?
	int myfun(heap_arr[])
	{
		int mini=INF;
		for(int i=0;i<tot_node;i++)
		mini=min(mini,heap_arr)
		return mini;

a) Last added element to heap
b) First element added to heap
c) Root of the heap
d) Leftmost node of the heap

View Answer

Answer: c

Explanation:

The function return minimum value in the heap_Array which is equal to the root value of the heap.

8. Which of these operations have same complexities?

a) Insertion, find_min
b) Find_min, union
c) Union, Insertion
d) Deletion, Find _max

View Answer

Answer: c

Explanation:

With proper implementation using link list find_min and find_max operation can be done in O(1), while the remaining takes O(logn) time.

 

9. The Statement “Fibonacci heap has better amortized running time in compare to a binomial heap”.

a) True
b) False

View Answer

Answer: a

Explanation:

Overall complexity of insertion, merging, deleting is in order of O((a+b)logn) For Fibonacci the complexity reduces to O(a+ blogn).

10. Given a heap of n nodes.The maximum number of tree for building the heap is.

a) n
b) n-1
c) n/2
d) logn

View Answer

Answer: a

Explanation:

Each node could be seen as a tree with only one node and as a result maximum subtree in the heap is equal to number of nodes in the heap.

11. Choose the option with function having same complexity for a fibonacci heap.

a) Insertion, Union
b) Insertion, Deletion
c) extract_min, insertion
d) Union, delete

View Answer

Answer: a

Explanation:

For a fibonacci heap insertion, union take O(1) while remaining take O(logn) time.

12. What is wrong with the following code of insertion in fibonacci heap. Choose the correct option
	FIB-INSERT(H, x)
	degree[x]= 0
	p[x]=  NIL
	child[x] =NIL
	left[x] =x
	right[x] =x
	mark[x] =FALSE
	concatenate the root list containing x with root list H 
	if min[H] = NIL or key[x] > key[min[H]]
	then min[H]= x
	n[H]= n[H] + 1

a) Line -11
b) Line -3
c) Line 9
d) Line 7

View Answer

Answer: c

Explanation:

The main characterstics of a fibonacci heap is violated since min[H] must conatin one with smallest value.

13. What will be the order of new heap created after union of heap H1 and H2 when created by the following code.Initially both are of the order n.
	FIB_UNION(H1,H2)
	{
		H =MAKE_HEAP()
		min[H]= min[H1]
		concatenate the root list of H2 with the root list of H
		if (min[H1] = NIL) or (min[H2]!= NIL and min[H2] < min[H1])
		then min[H] = min[H2]
		n[H]=  n[H1] + n[H2]
		free the objects H1 and H2
		return H
	}

a) n+1
b) n+n/2
c) nlogn
d) 2*n

View Answer

Answer: a

Explanation:

 Union of two trees increase the order of the resultant by atmost value 1.

14. Who invented k-d trees?

a) Arne Andersson
b) Jon Bentley
c) Jon Von Newmann
d) Rudolf Bayer

View Answer

Answer: b

Explanation:

 Jon Bentley found k-d trees. Rudolf Bayer found red black trees. Arne Andersson found AA- trees.

15. What is the condition for an equivalence relation if two cities are related within a country?

a) the two cities should have a one-way connection
b) the two cities should have a two-way connection
c) the two cities should be in different countries
d) no equivalence relation will exist between two cities

View Answer

Answer: b

Explanation:

 If the two towns are in the same country and have a two-way road connection between them, it satisfies equivalence property.

16. Reversal algorithm and juggling algorithm for array rotation have the same time complexity.

a) True
b) False

View Answer

Answer: a

Explanation:

 Time complexity of juggling algorithm is O(n) which like that of reversal algorithm. They also have the same space complexity

    You May Also Like...

  • Top Stories About Minajhola Shiva Temple, Chandrapur, Rayagada [new]
  • Avoid Top 5 Major Mistakes While Changing Careers
  • Top 100+ Python Interview Questions and Answers For 2023
  • Private Limited Company- Documents and Process of Registration
  • TOP MCQs on Bit Array Data Structure with Answers
  • TOP MCQs on Number of Jumps to Reach End-array Operation Data Structure with Answers
  • TOP MCQs on Skip List Data Structure with Answers
  • TOP MCQs on Binary Tree Properties Data Structure with Answers

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Quick Links

  • Home
  • About Us
  • Privacy Policy
  • Terms of Use
  • Disclaimer
  • Contact Us

Categories

  • Income Tax
  • International Taxation
  • GST
  • MCQs
  • Others
  • CA Courses

Latest Posts

  • Five changes in ITR forms of FY 2024-25 (AY 2025-26)
  • Form 10-IEA: Option to Choose Old Tax Regime
  • What is Section 54EC of the Income Tax Act?
  • What is Section 54F of the Income Tax Act?
©2025 Online Solves. All rights Reserved | Developed by AlgoPage IT Solutions Pvt. Ltd.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT