0% found this document useful (0 votes)
5 views3 pages

Subject: DAA Year and Semester: III/I Unit - Ii: S.No Blooms Level A B C D E Ans

The document contains a series of questions and answers related to sorting algorithms, data structures, and their complexities, primarily focusing on concepts like Quick Sort, Merge Sort, and heaps. Each question is categorized under Bloom's taxonomy level of understanding, with multiple-choice answers provided. The document serves as an educational resource for students in their third year, semester one, covering key topics in computer science.

Uploaded by

saiprajwal7244
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Subject: DAA Year and Semester: III/I Unit - Ii: S.No Blooms Level A B C D E Ans

The document contains a series of questions and answers related to sorting algorithms, data structures, and their complexities, primarily focusing on concepts like Quick Sort, Merge Sort, and heaps. Each question is categorized under Bloom's taxonomy level of understanding, with multiple-choice answers provided. The document serves as an educational resource for students in their third year, semester one, covering key topics in computer science.

Uploaded by

saiprajwal7244
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Subject: DAA Year and Semester: III/I

UNIT – II

S.No Blooms Level Question A B C D E Ans


In sorting, the data to be sorted is all
External Internal In-place None
1 Understanding stored in the computer’s main memory. Stable sorting B
Sorting Sorting sorting
Then it is called as ------
Recurrence
Recurrence Recurrence
Recurrence is is T(n) =
What is recurrence equation for worst is T(n) = is T(n) = None
2 Understanding T(n) = 2T(n/2) + T(n/10) + B
case of Quick Sort? T(n-2) + T(n-1) +
O(n) T(9n/10) +
O(n) O(n)
O(n)
If the amount of extra space required to
3 Understanding sort the data is constant with the input In-place Stable Internal External None A
size. Then such sorting is called as
What is the time complexity for insertion None
4 Understanding O(n2) O(n) O(n log n) O(n2 log n) B
sort best case?
What is the time complexity for selection None
5 Understanding O(n2) O(n) O(n log n) O(n2 log n) A
sort best case?
What is the recurrence equation for None
6 Understanding T(n-1) + n T(n-1) + 1 T(n/2) + n T(n/2) + 1 D
binary search?
dynamic
Merge sort uses which of the following backtracki greedy divide and None
7 Understanding programmin C
technique to implement sorting? ng algorithm conquer
g
Which of the following sorting algorithm
Insertion Selection None
8 Understanding will take the least time when applied to Quick sort Merge sort B
sort sort
an almost sorted array?
Random
Which of the following sorting algorithm None
9 Understanding quick sort merge sort heap sort version of E
does not use recursion?
quick sort
What is the average running time of a None
10 Understanding O(N2) O(N) O(N log N) O(log N) C
quick sort algorithm?
Apply Quick sort on a given sequence 7
6 4 3 7 11 6 3 4 7 9 14 7 6 14 11 9 4 3 7 6 4 3 9 14 None
11 Understanding 11 14 6 9 4 3 12. What is the sequence B
9 14 12 11 12 12 11 12
after first phase, pivot is first element?
Consider the Quick sort algorithm in
which the partitioning procedure splits
T(n) <=
elements into two sub-arrays and each T(n) <=
T(n) <= 2 T(n/4) + T(n) <= 2 None
12 Understanding sub-array contains at least one-fourth of T(n/3) + B
T(n/4) + cn T(3n/4) + T(3n/4) + cn
the elements. Let T(n) be the number of T(3n/4) + cn
cn
comparisons required to sort array of n
elements. Then
The recurrence relation capturing the T(n) =
T(n) = 2T(n T(n) = 2T(n/2) + T(n) = 2T(n None
13 Understanding optimal time of the Tower of Hanoi 2T(n – 2) + D
– 1) + n 1 – 1) + 1
problem with n discs is. 2
divide and dynamic
greedy backtracking None
14 Understanding Quick sort is a __________ conquer programming B
algorithm algorithm
algorithm algorithm
State whether the below statement is true
or false.
15 Understanding True False B
“In general quick sorting, running time is
independent of the input order.”
State whether the below statement is true
or false.
16 Understanding “In random version of quick sort, True False A
running time is independent of the input
order.”
Sum of “1/n + 1/(n-1) + 1/(n-2) + … + 1”
17 Understanding 2 1 Log2n n n2 C
is
18 Understanding Sum of “1 + 1/2 + 1/4 + 1/8 + … ” is 2 1 Log2n n n2 A
In which divide and conquer sorting 1. Strassen's
19 Understanding method, elements are not swapping Quick Sort Heap Sort Merge Sort Matrix None C
during divide phase. multiplication
T(n) =
T(n) =
What is the recurrence equation of merge T(n) = T(n- T(n) = 2T(n/2) T(n/10) + None
20 Understanding T(n-2) + C
sort? 1) + O(n) + O(n) T(9n/10) +
O(n)
O(n)
What is the worst case running time of a None
21 Understanding O(N2) O(N) O(N log N) O(log N) C
merge sort algorithm?
In priority queue data structures, if the Duplicate First in
First in Last in first No specific Last
22 Understanding priority is same then follows the priority is not B
first out out order out
principle as allowed
Priority
Complete Both (A) and None
23 Understanding Heap follows the property(s) ----- data Fully tree D
tree (B)
structure
State which statement(s) is true in max- Depen
heap?(assume unique priority) Neither ds on
Statement-1: Parent priority is greater Statement- Both statements- Statement 1 the
24 Understanding Statement-2 A
than its children’s priority. 1 1 and 2 nor situatio
Statement-2: Right child priority is Satetment2 n
greater than the left child’s priority.
State which statement(s) is true in min- Depen
heap?(assume unique priority) Neither ds on
Statement-1: Parent priority is smaller Statement- Both statements- Statement 1 the
25 Understanding Statement-2 A
than its children’s priority. 1 1 and 2 nor situatio
Statement-2: Left child priority is Satetment2 n
smaller than the right child’s priority.
For heap, if the array index is “i", then 2*(i-1)
26 Understanding 2*i (2*i)-1 2*(i+1) (2*i)+1 D
left-child(i) is: (Consider index from 0)
For heap, if the array index is “i", then Floor((
27 Understanding 2*i Ceil(i/2) Floor(i/2) Ceil((i-1)/2) i-1)/2) E
parent(i) is : (Consider index from 0)
In the worst case, insert an element into a None
28 Understanding O(1) O(n) O(n log n) O(log n) D
heap ----
In the worst case, delete an element from None
29 Understanding O(1) O(n) O(log n) O(n log n) C
a heap ----
State whether the below statement is true
or false.
30 Understanding True False B
A data set can have more than one
median?

You might also like