DAA Quiz Answers
DAA Quiz Answers
Galgotias University
Authored by: Hrithik Gupta
Quiz answers of :-
Design and analysis of Algorithm
1
Quiz Questions & Answers :-
int count = 0;
count = count + 1;
return count;
A.
Theta (n)
B.
Theta (n^2)
C.
Theta (n log n)
2
D. None
2. The word ____________comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Kh
A. Algorithm
B. Flowchart
C. Syntax
D. None
3. In computer science, algorithm refers to a special method usable by a computer for the solution to a problem.
A. True
B. False
4. When an algorithm is written in the form of a programming language, it becomes a _________
A. Program
B. Syantax
C. Flow Chart
D. Psudo code
5. Suppose we are sorting an array of eight integers using heapsort, and we have just finished some heapify (either m
28 How many heapify operations have been performed on root of heap?
A. 1
B. 2
C. 3 or 4
D. 5
6. Which of the following is true about merge sort?
A. Merge Sort works better than quick sort if data is accessed from slow sequential memory.
3
B.
D.
7. Which of the following sorting algorithms has the lowest worst-case complexity?
A. Merge Sort
B. Quick Sort
C. Bubble Sort
D. Selection Sort
8. What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using
A. n
B. n log n
C. n^2
D. None
9. A ______________ is diagram that depicts the flow of a program.
A. Algorithm
B. hash table
C. graph
D. flow chart
10. What is recurrence for worst case of QuickSort and what is the time complexity in Worst case?
4
A.
B.
D.