Data Structures and Algorithms-I MCQs

Page No. 17

An expression tree is a kind of?


aBinary search tree

✖


bFibonacci tree

✖


cBinary tree

✓


dTreap

✖


View Answer Binary tree

What does the other nodes of an expression tree(except leaves) contain?


aonly operands

✖


bonly operators

✓


cboth operands and operators

✖


dexpression

✖


View Answer only operators

A node can have a minimum of one child.


aTrue

✓


bFalse

✖


ceither true either false

✖


dNone of the mentioned

✖


View Answer True

The leaves of an expression tree always contain?


aoperators

✖


boperands

✓


cnull

✖


dexpression

✖


View Answer operands

An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of


aO(n*n*logn)

✖


bO(n*logn)

✓


cO(n*n)

✖


dO(n *logn *logn)

✖


View Answer O(n*logn)

Heap can be used as ________________


aPriority queue

✓


bStack

✖


cA decreasing order array

✖


dNormal Array

✖


View Answer Priority queue

The worst case complexity of deleting any arbitrary node value element from heap is __________


aO(logn)

✓


bO(n)

✖


cO(nlogn)

✖


dO(2n)

✖


View Answer O(logn)

What is the complexity of adding an element to the heap.


aO(log n)

✖


bO(h)

✖


cO(log n) & O(h)

✓


dO(n)

✖


View Answer O(log n) & O(h)

Heap exhibits the property of a binary tree?


aTrue

✓


bFalse

✖


ceither true either false

✖


dNone of the mentioned

✖


View Answer True

In a max-heap, element with the greatest key is always in the which node?


aLeaf node

✖


bFirst node of left sub tree

✖


croot node

✓


dFirst node of right sub tree

✖


View Answer root node

Goto Page No.

Page 17 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