Data Structures Algorithms-II MCQs

Page No. 66

Prim’s algorithm is a ______


a Divide and conquer algorithm

✖


bGreedy algorithm

✓


cDynamic Programming

✖


dApproximation algorithm

✖


View Answer Greedy algorithm

Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is used?


aO(log V)

✖


bO(V2)

✓


c O(E2)

✖


dO(V log E)

✖


View Answer O(V2)

Consider the given graph.


a 23

✖


b28

✖


c 27

✓


d11

✖


View Answer 27

Which of the following is true?


aPrim’s algorithm initialises with a vertex

✓


b Prim’s algorithm initialises with a edge

✖


c Prim’s algorithm initialises with a vertex which has smallest edge

✖


dPrim’s algorithm initialises with a forest

✖



Dijkstra’s Algorithm is the prime example for ___________


aGreedy algorithm

✓


bBranch and bound

✖


cBack tracking

✖


dDynamic programming

✖


View Answer Greedy algorithm

In the given graph, identify the shortest path having minimum cost to reach vertex E if A is the source vertex.


aa-b-e

✖


ba-c-e

✓


c a-c-d-e

✖


d a-c-d-b-e

✖


View Answer a-c-e

Consider the following graph.


a 8

✖


b 9

✖


c 4

✖


d6

✓


View Answer 6

Given pseudo code of Dijkstra’s Algorithm.


aWhile loop gets executed for v times

✖


bWhile loop gets executed for v-1 times

✓


cWhile loop gets executed only once

✖


dWhile loop does not get executed

✖



Dijkstra’s Algorithm run on a weighted, directed graph G={V,E} with non-negative weight function w and source s, terminates with d[u]=delta(s,u) for all vertices u in V.


a True

✓


b False

✖


cA & B

✖


dNone of these

✖


View Answer True

The running time of Bellmann Ford algorithm is lower than that of Dijkstra’s Algorithm.


aTrue

✖


bFalse

✓


cA & B

✖


dNone of these

✖


View Answer False

Goto Page No.

Page 66 of 149

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