Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
80 views
Dsa Quiz 3
Uploaded by
Varun Arora
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DSA-QUIZ-3 For Later
Download
Save
Save DSA-QUIZ-3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
80 views
Dsa Quiz 3
Uploaded by
Varun Arora
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DSA-QUIZ-3 For Later
Carousel Previous
Carousel Next
Save
Save DSA-QUIZ-3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 10
Search
Fullscreen
Sorting_Searching Quiz(MCA-III) Sorting_Searching Quiz * Required 1, Email * 2. Name* 3. Section * Mark only one oval. COa COs 4. University Roll Number *‘Suppose we have a O(n) time algorithm that finds median of an unsorted * 1 point array.Now consider a QuickSort implementation where we first find median using the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified QuickSort. Mark only one oval. ©) 0(n2 Logn) © oma) What is recurrence for worst case of QuickSort and what is the time * 1 point complexity in Worst case? Mark only one oval. —_) Recurrence is T(n) = T(n-2) + O(n) and time complexity is O(n*2) ) Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n*2) aA ») Recurrence is T(n) = 2T(n/2) + O(n) and time complexity is O(nLogn) (—) Recurrence is T(n) = T(n/10) + T(9n/10) + O(n) and time complexity is O(nLogn) Which of the following is not a stable sorting algorithm in its typical * 1 point implementation. Mark only one oval. ) auick sort ) Bubble Sort8. Suppose we are sorting an array of eight integers using quicksort, and we * 1 point have just finished the first partitioning with the array looking like this:2 5 17 9 12 11 10 Which statement is correct? Mark only one oval. (_) The pivot could be either the 7 or the 9. (_) The pivot could be the 7, but it is not the 9 (—) The pivot is not the 7, but it could be the 9 -) Neither the 7 nor the 9 is the pivot. 9, What is the worst case complexity of selection sort? * 1 point Mark only one oval. ©) o(nlogn) €) oftogn) Oo) ») 0(n'2) 10. Where is linear searching used? * 1 point Mark only one oval. (—) When the list has only a few elements When performing a single search in an unordered list, (_D Used all the time (—) When the list has only a few elements and When performing a single search in an unordered list11. 12. 13. What is the best case for linear search? * Mark only one oval. What is the worst case for linear search? * Mark only one oval. Binary Search can be categorized into which of the following? * Mark only one oval. Brute Force technique () Divide and conquer ) Greedy algorithm (_) Dynamic programming 1 point 1 point 1 point14. 15. How many passes does an insertion sort algorithm consist of? * 1 point Mark only one oval. Which one of the following is the recurrence equation for the worst case * ‘point time complexity of the Quicksort algorithm for sorting n(2 2) numbers? In the recurrence equations given in the options below, c is a constant. Mark only one oval. C) Tn) = 27 (0/2) + en ©) 1m) = 27 (n= 2) +n () T(n) = T(n/2) + en Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following are TRUE ? Quicksort runs in @(n*2) time Bubblesort runs in @(n*2) time Merge sort runs in @(n) time IV. Insertion sort runs in @(n) time 16. * 1 point Mark only one oval. ©) Nand Il only ©) land ill only (9 tand IV only CO land Iv only17. Consider the array Al]= {6,4,8,1,3) apply the insertion sort to sort the array Consider the cost associated with each sort is 25 rupees , what is the total cost of the insertion sort when element 1 reaches the first position of the array ? Mark only one oval. 18. Which of the following algorithm design technique is used in merge sort? * Mark only one oval. ( Greedy method ») Backtracking >) Dynamic programming Divide and Conquer state true or false ‘A. Binary Search is used to search ina sorted array B. Time complexity of binary search is O(log n) 19. Mark only one oval. © True,True True, False ) False, True ) False, False * 1 point 1 point 1 point20. Which is not internal sorting * 1 point Mark only one oval. Insertion Sort () Bubble Sort () Merge Sort » Heap Sort 21. Which of the following sorting algorithms is/are stable * 1 point Mark only one oval. ©) Counting sort () Bucket sort (Radix sort ( Allof the above 22. Counting sort performs Numbers of comparisons between input * 1 point elements. Mark only one oval. Coo On ©) nlogn23. Asorting technique is called stable if it * 1 point Mark only one oval. Takes O(nlogn) times (—) Maintains the relative order of occurrence of non-distinct elements () Uses divide-and-conquer paradigm (_) Takes O(n) space 24. Inabinary max heap containing n numbers, the smallest element canbe * i point found in time Mark only one oval. 2 8(n) © (logn) (©) @ (loglogn) Ce) 25. Which one of the following sorting algorithm is best suited to sort an array * 1 point of 1 million elements? Mark only one oval. (> Bubble sort (—) Insertion sort () Merge sort ) Quick sort26. Amachine needs a minimum of 200 sec to sort 1000 elements by Quick —* 1 point sort, The minimum time needed to sort 200 elements will be approximately Mark only one oval. ©) 60.2 sec (45.54 sec 31.11 sec ) 20sec The essential part of Heap sort is construction of max-heap. Consider the tree shown below, the node 24 violates the max-heap property. Once heapify procedure is applied to it, which position will it be in? 27, * 1 point Mark only one oval. Oo4 Os oe Os28. How many comparisons will be made to sort the array arr=(1, 5, 3,8, 2) * Ipoint using bucket sort? Mark only one oval. Cc 5 7 9 Oo 29. Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are * {point done until the element is found? Mark only one oval. 1 COs Co4 Oz This content is neither created nor endorsed by Google Google Forms
You might also like
Problem Solving Using C KCA-102: Introduction To Course
PDF
No ratings yet
Problem Solving Using C KCA-102: Introduction To Course
36 pages
SPPU All Course MCQ: All MCQ PDF Format Mba / Be /ba /engieenaring / BSC /MSC /bca/ Bcom
PDF
No ratings yet
SPPU All Course MCQ: All MCQ PDF Format Mba / Be /ba /engieenaring / BSC /MSC /bca/ Bcom
10 pages
1 Key
PDF
No ratings yet
1 Key
6 pages
1 PDF
PDF
No ratings yet
1 PDF
4 pages
Quiz 2
PDF
No ratings yet
Quiz 2
6 pages
Search Sort MCQ Gate
PDF
No ratings yet
Search Sort MCQ Gate
17 pages
Combined CD Ac Papers
PDF
No ratings yet
Combined CD Ac Papers
466 pages
Placement Questions: Searching
PDF
No ratings yet
Placement Questions: Searching
5 pages
Search Sort MCQ Gate
PDF
No ratings yet
Search Sort MCQ Gate
12 pages
DS All Units MCQ
PDF
No ratings yet
DS All Units MCQ
141 pages
Unit V Searching and Sorting Algorithms Syllabus
PDF
No ratings yet
Unit V Searching and Sorting Algorithms Syllabus
16 pages
Chapter 2 Divide and Conquer
PDF
No ratings yet
Chapter 2 Divide and Conquer
36 pages
Unit1 - Introduction To Data Structure
PDF
No ratings yet
Unit1 - Introduction To Data Structure
6 pages
UNIT-6 (1)
PDF
No ratings yet
UNIT-6 (1)
5 pages
Unit C
PDF
No ratings yet
Unit C
5 pages
JSPM'S Jayawantrao Sawant College of Engineeringhadpsar, Pune-33 Department of Information Technology Multiple Choice Questions Unit-4
PDF
No ratings yet
JSPM'S Jayawantrao Sawant College of Engineeringhadpsar, Pune-33 Department of Information Technology Multiple Choice Questions Unit-4
9 pages
Algorithm Quiz
PDF
No ratings yet
Algorithm Quiz
40 pages
Sorting
PDF
50% (2)
Sorting
2 pages
Sorting & Searching
PDF
No ratings yet
Sorting & Searching
55 pages
2.0 Divide and Conquer
PDF
No ratings yet
2.0 Divide and Conquer
25 pages
Barron - Chapter 8 - MCQ
PDF
No ratings yet
Barron - Chapter 8 - MCQ
11 pages
Tab DAA_S1_1446 with key _MIDTERM SOlution
PDF
No ratings yet
Tab DAA_S1_1446 with key _MIDTERM SOlution
4 pages
CS502 Quiz-2 File by Vu Topper RM
PDF
No ratings yet
CS502 Quiz-2 File by Vu Topper RM
45 pages
Mcq new
PDF
No ratings yet
Mcq new
3 pages
CDS S3
PDF
No ratings yet
CDS S3
6 pages
Quiz Questions - 1
PDF
No ratings yet
Quiz Questions - 1
4 pages
Quiz about Top MCQs on Sorting Algorithms with Answers
PDF
No ratings yet
Quiz about Top MCQs on Sorting Algorithms with Answers
6 pages
DAA Lab Manual
PDF
No ratings yet
DAA Lab Manual
49 pages
FRQs & MCQs - Sorting
PDF
No ratings yet
FRQs & MCQs - Sorting
8 pages
Solution_FSD2_ 1st May
PDF
No ratings yet
Solution_FSD2_ 1st May
17 pages
DAA Q - A chp2
PDF
No ratings yet
DAA Q - A chp2
6 pages
Dcit 204 Quiz 2 Questions
PDF
No ratings yet
Dcit 204 Quiz 2 Questions
10 pages
Algorithms-section6.2
PDF
No ratings yet
Algorithms-section6.2
5 pages
Unit 2 Sorting
PDF
No ratings yet
Unit 2 Sorting
43 pages
Insertion Sort: What Are The Boundary Cases of Insertion Sort Algorithm?
PDF
No ratings yet
Insertion Sort: What Are The Boundary Cases of Insertion Sort Algorithm?
5 pages
01 DS Quiz Set
PDF
No ratings yet
01 DS Quiz Set
109 pages
Quiz Solutions
PDF
95% (20)
Quiz Solutions
11 pages
Bms Institute of Technology Department of Mca Sub Code - 16mca38 Algorithms Laboratory Viva Questions
PDF
No ratings yet
Bms Institute of Technology Department of Mca Sub Code - 16mca38 Algorithms Laboratory Viva Questions
13 pages
MCQs On Sorting
PDF
No ratings yet
MCQs On Sorting
16 pages
DAA Practical File
PDF
No ratings yet
DAA Practical File
41 pages
DAA 2020 Week 02 Assignment 01
PDF
No ratings yet
DAA 2020 Week 02 Assignment 01
3 pages
Deva DS Quiz
PDF
No ratings yet
Deva DS Quiz
10 pages
Unit 1 DSA
PDF
No ratings yet
Unit 1 DSA
50 pages
Unit Ii Daa.j
PDF
No ratings yet
Unit Ii Daa.j
83 pages
module-2
PDF
No ratings yet
module-2
49 pages
Al-Junaid Tech Institute
PDF
No ratings yet
Al-Junaid Tech Institute
554 pages
Cs502 Midterm Solved Mcqs by Junaid (1) (1) (1)
PDF
No ratings yet
Cs502 Midterm Solved Mcqs by Junaid (1) (1) (1)
47 pages
Cheat Sheet
PDF
No ratings yet
Cheat Sheet
1 page
Data Structure-52-54
PDF
No ratings yet
Data Structure-52-54
3 pages
Unit 2 Divide and Conquer (1)
PDF
No ratings yet
Unit 2 Divide and Conquer (1)
146 pages
Sorting Algorithms 2
PDF
No ratings yet
Sorting Algorithms 2
26 pages
DAA Quiz 1
PDF
No ratings yet
DAA Quiz 1
2 pages
G3-Insertion-Sort-Quiz (With ans Key)
PDF
No ratings yet
G3-Insertion-Sort-Quiz (With ans Key)
5 pages
DSA 16
PDF
No ratings yet
DSA 16
32 pages
Question 1: Correct Incorrect
PDF
No ratings yet
Question 1: Correct Incorrect
3 pages
L9_sorting
PDF
No ratings yet
L9_sorting
50 pages
ADSAD
PDF
No ratings yet
ADSAD
7 pages
PART_B_DAA_UNIT_1
PDF
No ratings yet
PART_B_DAA_UNIT_1
11 pages
Algorithm Assignment
PDF
No ratings yet
Algorithm Assignment
6 pages
Lecture 12 AG
PDF
No ratings yet
Lecture 12 AG
10 pages
Dynamic Hyper Text Markup Language
PDF
No ratings yet
Dynamic Hyper Text Markup Language
89 pages
Computer Fundamentals and Programming in C: By: Pradip Dey & Manas Ghosh
PDF
No ratings yet
Computer Fundamentals and Programming in C: By: Pradip Dey & Manas Ghosh
37 pages
Computer Fundamentals and Programming in C: By: Pradip Dey & Manas Ghosh
PDF
No ratings yet
Computer Fundamentals and Programming in C: By: Pradip Dey & Manas Ghosh
48 pages
Introduction To Programming
PDF
No ratings yet
Introduction To Programming
17 pages