adplus-dvertising
frame-decoration

Question

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

Answer: (c).Root of the heap

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What does this pseudo_code return ?

Similar Questions

Discover Related MCQs

Q. Which of these operations have same complexities?

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

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

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

Q. What is a hash table?

Q. If several elements are competing for the same bucket in the hash table, what is it called?

Q. What is direct addressing?

Q. What is the search complexity in direct addressing?

Q. What is a hash function?

Q. What can be the techniques to avoid collision?

Q. What is the load factor?

Q. What is simple uniform hashing?

Q. In simple uniform hashing, what is the search complexity?

Q. In simple chaining, what data structure is appropriate?

Q. When is it appropriate to use direct addressing?

Q. What is the time complexity to insert an element into the direct address table?

Q. What is the advantage of using a dynamic set in direct addressing?

Q. What is the time complexity to delete an element from the direct address table?

Q. How is a bit vector better compared to a normal array for implementing the hash table?

Q. A ________ is a special Tree-based data structure in which the tree is a complete binary tree.