Data Structures Algorithms-II MCQs

Page No. 148

What will be the output if quickselect algorithm is applied to the array arr={1,5,4,3,7} with k given as 4?


a1


b3


c4


d5


View Answer 5

Quickselect is an example of ___________


asorting algorithm


bselection algorithm


cgreedy algorithm


dsearching algorithm


View Answer selection algorithm

Which of the following is an alternative name of the quickselect algorithm?


aquick sort


bhoare’s selection algorithm


ctony’s selection algorithm


dkruskal’s algorithm



Co-ordinate compression can only be applied in a co-ordinate system problem.


atrue


bfalse


cA & B


d None of these


View Answer false

Co-ordinate compression reduces the number of squares in a graph.


a true


bfalse


cA & B


d None of these


View Answer true

What is the need for co-ordinate compression?


afor improving time complexity


bfor improving space complexity


c for improving both time and space complexity


dfor making code simpler



What is co-ordinate compression?


aprocess of reassigning co-ordinates to remove gaps


binserting gaps in a co-ordinate system


cremoving redundant co-ordinates


dadding extra gaps



What will be the time complexity of the code to find a minimum element from an array of size n and uses square root decomposition(exclude pre processing time)?


aO(√n)


bO(n)


cO(1)


dO(n2)


View Answer O(√n)

Mo’s algorithm can only be used for problems where the query can be calculated from the result of the previous query.


atrue


bfalse


cA & B


d None of these


View Answer true

What will be the worst case time complexity of code to find sum in given query range (l,r) in an array of size n with q number of such queries when we apply MO’s algorithm?


aO(n*q)


bO(n)


cO((q+n)√n)


dO(q*√n)


View Answer O((q+n)√n)

Goto Page No.

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