Data Structures Algorithms-II MCQs

Page No. 90

Which of the following sorting algorithm is NOT stable?


aSelection sort

✓


bBrick sort

✖


cBubble sort

✖


d Merge sort

✖


View Answer Selection sort

What will be the recurrence relation of the code of recursive selection sort?


aT(n) = 2T(n/2) + n

✖


bT(n) = 2T(n/2) + c

✖


c T(n) = T(n-1) + n

✓


dT(n) = T(n-1) + c

✖


View Answer T(n) = T(n-1) + n

Which of the following is the biggest advantage of selection sort?


aits has low time complexity

✖


b it has low space complexity

✖


c it is easy to implement

✖


dit requires only n swaps under any condition

✓



Which of the following sorting algorithm has best case time complexity of O(n2)?


a bubble sort

✖


bselection sort

✓


c insertion sort

✖


d stupid sort

✖


View Answer selection sort

Which of the following methods can be used to find the largest and smallest element in an array?


aRecursion

✖


bIteration

✖


cBoth recursion and iteration

✓


d No method is suitable

✖



Which of the following methods can be used to find the largest and smallest number in a linked list?


aRecursion

✖


bIteration

✖


cBoth Recursion and iteration

✓


d Impossible to find the largest and smallest numbers

✖



Consider the array {1,1,1,1,1}. Select the wrong option?


aIterative linear search can be used to search for the elements in the given array

✖


b Recursive linear search can be used to search for the elements in the given array

✖


cRecursive binary search can be used to search for the elements in the given array

✖


d No method is defined to search for an element in the given array

✓



Which of the following techniques can be used to search an element in an unsorted array?


aIterative linear search

✓


bRecursive binary search

✖


c Iterative binary search

✖


dNormal binary search

✖



Minimum time required to solve tower of hanoi puzzle with 4 disks assuming one move takes 2 seconds, will be __________


a 15 seconds

✖


b30 seconds

✓


c16 seconds

✖


d32 seconds

✖


View Answer 30 seconds

Tower of hanoi problem can be solved iteratively.


aTrue

✓


b False

✖


cA & B

✖


dNone of these

✖


View Answer True

Goto Page No.

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