0% found this document useful (0 votes)
39 views2 pages

DAA - Unit 1 - Tute 2 Up

Uploaded by

goyalvatsal93
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)
39 views2 pages

DAA - Unit 1 - Tute 2 Up

Uploaded by

goyalvatsal93
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/ 2

B.Tech.

(Computer Science and Engineering)


Semester-V
Subject: Data Analysis and Algorithm
Subject code BCO023A
Marks: 64

CO1: Various methods of calculating complexity

Unit #1
Tutorial sheet 2
Sec-A
(2x5=10marks)

1. Explain what Big O notation is and how it is used to describe the upper bound of an algorithm's time
complexity.
2. Provide examples of algorithms with different Big O complexities.

3. Explain what Little O notation represents in terms of the growth rate of a function. How does it differ
from Big O notation?
4. Define the Divide and Conquer algorithm paradigm in computer science.
5. Explain the three main steps involved in a Divide and Conquer algorithm.

Sec-B
/* Note: Each question may have one or two parts */
(3x7=21 marks)

1. How are asymptotic notations like Big O and Big Theta used to analyze space complexity? Provide
an example of analyzing space complexity using these notations.

2. What are the limitations of asymptotic notations in characterizing the performance of algorithms? When
might they not provide a complete picture?

3. Create a pictorial representation of the Insertion Sort algorithm for sorting the following list of
integers: [12, 5, 9, 3, 2, 8, 7].
Sec-C

/* Note: Each question may have one, two, or three parts */


[3*11=33 marks]

1. A. You are given an array of integers: [15, 7, 22, 3, 9, 11, 5].


a) Using the Max-Min algorithm, find both the maximum and minimum values in the given array.
Show the step-by-step process and the values of the maximum and minimum as you progress through
the algorithm.
b) Calculate the number of comparisons made by the Max-Min algorithm during its execution on this
array.
c) Analyze the time complexity of the Max-Min algorithm when applied to an array of n elements.
Provide a Big O notation for the time complexity based on your analysis.

2. Implement Binary Search on below data to find 79 :


10,20,30,43,56,67,79,90,100

3. Consider an algorithm for finding the longest increasing subarray in an array of integers. Analyze the
time complexity of the algorithm and discuss its efficiency.

[11 marks]

You might also like