Vous êtes sur la page 1sur 2

Analysis of Algorithms

Quiz#1

Department: CS & IT Total Marks: 10


Program: CS/IT-5
Course Instructor: Waqas Arshad Obtained Marks: ______

Name: ______________ Instructions: Obtained


1. Attempt all questions.
Roll No: ______________
2. Be precise and accurate in answering questions.
Date: ______________ 3. Read the questions carefully.
4. If you want to cut something cut it properly and write it again.
Time Allowed: 30 mins
5. There are total 3 questions in the quiz.
6.

Q#1: (10)
In linear search how many elements of the input sequence need to be checked on the average,
assuming that the element being searched for is equally likely to be any element in the array?
How about in the worst case? What are the average-case and worst-case running times of linear
search in ‚-notation? Justify your answers.
Quiz

Vous aimerez peut-être aussi