You are on page 1of 3

Student Declaration

I__________________________________ Registration No.__________________, hereby

declare that I will not be involved in any kind of cheating/copying/plagiarizing in solving the

assignment based paper of Mid Term Examination 2020. I take full responsibility of my

conduct. If I found involved in any kind of such activity of cheating/copying/plagiarizing

then Institute reserves the right to take any disciplinary action against me.

Student Signature
Mid Exam / Spring 2020 (Paper Duration 24 hours)

Course No.: CS 542 Course Title Analysis of Algorithm


Total Marks:……18 Date of Exam: 29-06-2019.
Degree: BSCS Semester: 4th Section: A, B
Marks
Q.No. 1 2 3 4 5 6 7 8 9 10 Obtained/
Total Marks
Marks
Obtaine
d
Total Marks in Words:
Name of the teacher:
Who taught the course:Signature of teacher / Examiner:

To be filled by Student

Registration No.: ………………………………………….……… Name:……………………………………………………..

Answer the following questions.

Q.No.1. (Marks 4)

Using big-oh notation, give the running time of the following piece of code. Briefly justify
your answer.
for (i = 1; i <= n; i++)
for (j = 1; j <= n/2; j++)
for (k = 1; k <= j; k++)
cout << "hello world\n";

Q.No.2 (marks 8)

Recall the 2-D Maxima Problem that we have discussed in class. Develop a scenario just like
discuss in class but don’t take the same example (build a new example to demonstrate the
2-D Maxima problem ) also example the worst case analysis of 2-D Maxima in detail
Q.No. 3
If you are working in an organization and you are asked to sort data having one million
values and you want to find out the results as soon as possible. Which sorry algorithm will
you prefer among you know and why if you choose any algorithm to sort the data you have
to justify its best performance by showing its time complexity (Mathematical proof)

(marks.. 6)

You might also like