Data Structures and Algorithms-I MCQs

Page No. 27

In a binary min heap containing n elements, the largest element can be found in __________ time.


aO(n)


bO(nlogn)


cO(logn)


dO(1)


View Answer O(n)

Which one of the following array elements represents a binary min heap?


a12 10 8 25 14 17


b8 10 12 25 14 17


c25 17 14 12 10 8


d14 17 25 10 12 8


View Answer 8 10 12 25 14 17

The procedure FindMin() to find the minimum element and the procedure DeleteMin() to delete the minimum element in min heap take _________


alogarithmic and linear time constant respectively


bconstant and linear time respectively


cconstant and quadratic time respectively


dconstant and logarithmic time respectively



The ascending heap property is ___________


aA[Parent(i)] =A[i]


bA[Parent(i)] <= A[i]


cA[Parent(i)] >= A[i]


dA[Parent(i)] > 2 * A[i]


View Answer A[Parent(i)] <= A[i]

Min heap can be used to implement selection sort.


aTrue


bFalse


cNone of the given options


deither true either false


View Answer True

Descending priority queue can be implemented using ______


amax heap


bmin heap


cmin-max heap


dtrie


View Answer max heap

Auto complete and spell checkers can be implemented efficiently using the trie.


aTrue


bFalse


cNone of the given options


deither true either false


View Answer True

Which of the following is true about the trie?


aroot is letter a


bpath from root to the leat yields the string


cchildren of nodes are randomly ordered


deach node stores the associated keys



What can be the maximum depth of the trie with n strings and m as the maximum sting the length?


alog2n


blog2m


cn


dm


View Answer m

A program to search a contact from phone directory can be implemented efficiently using ______


aa BST


ba trie


ca balanced BST


da binary tree


View Answer a trie

Goto Page No.

Page 27 of 53

Alphabetical MCQs Categories

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan