Question
mergeTree(p,q)
if p.root.value <= q.root.value
return p.addTree(q)
else
return q.addTree(p)
a.
True
b.
False
c.
May be
d.
Can't say
Posted under Data Structures and Algorithms
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Given the pseudo code, state whether the function for merging of two heap is correct or not?
Similar Questions
Discover Related MCQs
Q. What is order of resultant heap after merging two tree of order k?
View solution
Q. Time taken in decreasing the node value in a binomial heap is
View solution
Q. Which of these operations have same complexities?
View solution
Q. The Statement “Fibonacci heap has better amortized running time in compare to a binomial heap”.
View solution
Q. Given a heap of n nodes.The maximum number of tree for building the heap is.
View solution
Q. Choose the option with function having same complexity for a fibonacci heap.
View solution
Q. What is a hash table?
View solution
Q. If several elements are competing for the same bucket in the hash table, what is it called?
View solution
Q. What is direct addressing?
View solution
Q. What is the search complexity in direct addressing?
View solution
Q. What is a hash function?
View solution
Q. What can be the techniques to avoid collision?
View solution
Q. What is the load factor?
View solution
Q. What is simple uniform hashing?
View solution
Q. In simple uniform hashing, what is the search complexity?
View solution
Q. In simple chaining, what data structure is appropriate?
View solution
Q. When is it appropriate to use direct addressing?
View solution
Q. What is the time complexity to insert an element into the direct address table?
View solution
Q. What is the advantage of using a dynamic set in direct addressing?
View solution
Q. What is the time complexity to delete an element from the direct address table?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Data Structures and Algorithms? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!