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

Assignment 1

The document consists of a series of assignment questions related to algorithms, including definitions, design techniques, and specific algorithmic problems such as finding maximum elements in arrays, analyzing time complexities, and explaining concepts like divide and conquer, binary search, and merge sort. It also includes tasks to derive recurrence relations and time complexities for various recursive functions and sorting algorithms. Overall, the assignment aims to assess understanding of algorithm fundamentals and their applications.

Uploaded by

sboyina627
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)
2 views2 pages

Assignment 1

The document consists of a series of assignment questions related to algorithms, including definitions, design techniques, and specific algorithmic problems such as finding maximum elements in arrays, analyzing time complexities, and explaining concepts like divide and conquer, binary search, and merge sort. It also includes tasks to derive recurrence relations and time complexities for various recursive functions and sorting algorithms. Overall, the assignment aims to assess understanding of algorithm fundamentals and their applications.

Uploaded by

sboyina627
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

Assignment 1

Q1- What is an Algorithm? How to write an Algorithm explain?


Q-2 Write an algorithm to find maximum element from an array?
Q-3 What are Designing techniques of an algorithm? Explain all it’s Types with an
example?
Q-4 Find the recurrence relation of following recursive function?
int count(n){
if (n==1){
return 1;
}
return 1+count(n-1);
}
Q-5 What are loop invariants ?Explain with code?
Q-6 What are control statements? Explain?
Q-7 T(n)=4T(n/2)+n→find the time complexity using Tree recursive method?
Q-8 T(n)=2T(n/2)+1➔ find the time complexity using substitution method?
Q-9 T(n)=8T(n/2)+n-> find the time complexity using Master method. Tell which
case is applied using big-oh ,omega or theta functionalities?
Q-10 Find the recurrence relation of recursive selection sort ?Find it’s time
complexity?
Q-11 What is divide and conquer technique? What are steps of this technique?
Explain with code?
Q-11 Define Binary search? Write code for recursive binary search? Find
recurrence relation and time complexity for the same?
Q-12 What is merge Sort? Explain with an array? Write an algorithm for merge
sort?
Q-13 What is MinMax Algorithm ? Explain with an array={2,4,1,8,3}.

==========================END====================================

You might also like