# YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

## Ternary Heap Multiple choice Questions and Answers (MCQs)

Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

What is the time complexity for inserting a new item in a ternary heap of n elements?

O (log n/ log 3) | |

O (n!) | |

O (n) | |

O (1) |

Question 1 Explanation:

In order to insert a new item in a ternary heap data structure having n elements, the heap has great efficiency for inserting them. So the time complexity for worst case is found to be O (log n/ log 3).

Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

Is decrease priority operation performed more quickly in a ternary heap with respect to the binary heap.

True | |

False |

Question 2 Explanation:

Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. Due to the swapping process, the decrease priority operation performs more quickly in a ternary heap.

Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

What is the time complexity for decreasing priority of key in a minimum ternary heap of n elements?

O (log n/ log 3) | |

O (n!) | |

O (n) | |

O (1) |

Question 3 Explanation:

In order to decrease the priority of an item in a ternary heap data structure having n elements, the heap has great efficiency for decreasing them. So the time complexity for worst case is found to be O (log n/ log 3). This is due to the upwards swapping process.

Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

What is the time complexity for increasing priority of key in a maximum ternary heap of n elements?

O (log n/ log 3) | |

O (n!) | |

O (n) | |

O (1) |

Question 4 Explanation:

In order to increase the priority of an item in a ternary heap data structure having n elements, it performs upwards swapping. So the time complexity for worst case is found to be O (log n/ log 3).

Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

What is the time complexity for deleting root key in a ternary heap of n elements?

O (log n/ log 3) | |

O (3log n/ log 3) | |

O (n) | |

O (1) |

Question 5 Explanation:

In order to delete a root key in a ternary heap data structure having n elements, it performs downward swapping. So the time complexity for worst case is found to be O (3log n/ log 3).

There are 5 questions to complete.