DAA_C_MCQ_2
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Amit Mandal
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given two sorted list of size m and n respectively. The number of comparisons needed the worst case by the merge sort algorithm will be
m X n
maximum of m and n
minimum of m and n
m + n - 1
2.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
Let P be a quick sort program to sort numbers in ascending order using the first element as a pivot. Let t1 and t2 be the number of comparisons made by P for the inputs {1, 2, 3, 4, 5} and {4, 1, 5, 3, 2}, respectively. Which one of the following holds?
t1 = 5
t1 < t2
t1 > t2
t1 = t2
3.
MULTIPLE CHOICE QUESTION
3 mins • 2 pts
The following code snippet is an example of quick sort. What do the 'low' and 'high' parameters represent in this code?
The number of comparisons performed
The range of elements to sort within the array
The value of the pivot element
The number of swaps made during sorting
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is an example of a problem that cannot be solved using the divide and conquer approach?
Computing the nth Fibonacci number
Finding the median of two sorted arrays
Sorting a linked list
Finding the shortest path between two nodes in a graph
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the result of the recurrences which fall under the first case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc?
T(n) = O(n^logba)
T(n) = O(nc log n)
T(n) = O(f(n))
T(n) = O(n2)
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In Merge Sort, if the input array is already sorted in ascending order, how many times will the Merge function be called during the sorting process?
n-1
n
log n
0
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
When does Heap Sort perform at its worst?
When the input array is already sorted in ascending order.
When the input array elements are required to be sorted in reverse order.
When all elements of the input array are the same.
When the input array has no duplicate values.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Chapter 8 - Memory Management Strategies
Quiz
•
University
10 questions
MATEMÁTICA III
Quiz
•
University
10 questions
Website Usability and UX
Quiz
•
University
10 questions
Hands-on Modul 3
Quiz
•
University
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
10 questions
CS100||MsWord
Quiz
•
University
10 questions
Ulangan Harian Teknologi WAN Kelas XI Semester Gasal
Quiz
•
University
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
34 questions
Unit 5 Review - The Middle Ages in Europe-B
Quiz
•
9th Grade - University
26 questions
Day2 classwork: Permutation and combination
Quiz
•
2nd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
