A1194041789 63616 14 2022 Cse230daaca2k21ch

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Course Name- Design and Analysis

of Algorithms
Course Code- CSE 230
Continuous Assessment-II
Important Guidelines

1. All questions in this Academic Task are compulsory.

2. It is mandatory to attempt all questions of the assignment in your own handwriting on A4 size
sheets/pages with a blue color ink pen. Any other mode of attempt (typed or printed codes or table) except
handwritten/drawn will not be accepted/considered as valid submission(s) under any circumstances.

3. Every attempted sheet/page should carry clear details of student such as Name, Registration number, Roll
number, Question number and Page number. The page numbers should be written clearly on the bottom of
every attempted sheet in a prescribed format as: for page 1; Page 1 of 4, for page 2; Page 2 of 4, for page 3;
Page 3 of 4 and for page 4; Page 4 of 4, in case your assignment/document is of 4 pages.

4. After attempting the answer(s) file has to be submitted to respected Faculty.

5. Refrain from indulging into plagiarism as copy cases will be marked zero.

6. This Document contains multiple sets of papers. The allocation sheet is also attached in the CA file.
All the students are advised to attempt the Set allocated to him/her.

7. If any student found indulge in malpractices like plagiarism from internet or classmates,
attempting wrong set of question paper or any other, will be awarded with zero (0) marks in CA.
Design and Analysis of Algorithms (CSE-230) CA-II
Set-1 Max Marks-30

1. Write a note on how to perform Merge Sort using an Example. [10]

2. A) Sort the list L, E, A, R, N in alphabetical order by bubble sort. [5]

B) In which condition you will prefer selection sort? Explain time complexity analysis of Selection sort.
[5]

3. A) A card player arranges his card when he picks the card one by one and put at the appropriate place.
Now he is having 5 cards (The card Numbers:6, 5, 4, 7 and 2) in his hand. Write a java program to sort the
cards using an appropriate sorting algorithm. [5]

B) Explain why other sorting algorithms can’t be used in this scenario. [5]
Design and Analysis of Algorithms (CSE-230) CA-2
Set-2 Max Marks-30
1. A) Write a note on Calculating the complexity of Selection Sort from its algorithm.[5]

B) Why Selection sort is not adopts Divide-and-Conquer paradigm, compare it with any sorting
algorithm which adopts Divide-and-Conquer paradigm? [5]

2. Can you sort the Given array in O(n logn) time and O(1) memory. if Yes? Give proper detailed
justification in support of your choice.

Input: nums = [5,2,3,1,4]

Output:[1,2,3,4,5] [10]

3. A) Write a program to Sort the list 415, 213, 700, 515, 712, 715 using concept of Quicksort.
[5]
B) State and explain the recurrence for worst case of Quicksort. [5]
Design and Analysis of Algorithms (CSE-230) CA-II
Set-3 Max Marks-30

1. State and explain any sorting algorithm which adopts Divide-and-Conquer paradigm using an example.
[10]

2. A) Consider the following array, what is the status of the array after each pass when we use insertion
sort. [5]

Array Elements:20, 16, 12, 8, 4, 1

B) Is Bubble sort stable? Explain with an Example. [5]

3. A) Write a java program to sort the list P, O, W, E, R in alphabetical order by selection sort.
[5]

B) Analyse the time Complexity of the above program [5]


Design and Analysis of Algorithms (CSE-230) CA-2

Set-4 Max Marks-30


1. A) Calculate the Time Complexity of Bubble Sort from its algorithm. [5]

B) Compare any two-sorting algorithms which adopts Divide-and-Conquer paradigm? [5]

2. Consider the following array, Write an algorithm for returning an array after sorting it in ascending order
with O(n logn) time complexity.

Array Elements: [5, 46, 3, 11, 14, 2]

Output: [2, 3, 5, 11, 14, 46] [10]

3. A) Write a program to implement the concept of Quicksort [5]

B) Discuss it's time complexity with Merge Sort Algorithm. [5]


Design and Analysis of Algorithms (CSE-230) CA-2
Set-5 Max Marks-30
1. a) Discuss the comparison of Selection Sort and Bubble Sort. [5]
b) For the given input:- {3,1,5,6,2} Write down all the passes if sorting has to done by Bubble Sort
[5]

2. Consider a list arranged in an increasing order, Compare the time complexities with relevant justification
if such input case get processed by Merge Sort and Quick Sort. [10]

3. a) Write a program to show the process of Insertion Sort. [5]

b) Mention Best, Average and Worst-Case running time complexity of it. [5]
Design and Analysis of Algorithms (CSE-230) CA-2

Set-6 Max Marks-30


1. a) Mention input cases (Best and Average) of Insertion Sort with example in detail.
[5]
b) Mention input cases (Worst Case) of Insertion Sort with example in detail. [5]

2. Do we have the possibility to get O(n^2) in case of Merge Sort, Yes or No? Give proper detailed
justification in support of your choice. [10]

3 a) Write a program to implement the concept of Selection Sort. [5]


b) For the given input {5,7,98,45,32}, perform Merge Sort and run all the passes. [5]
Student List with Assigned Sets

Serial Registration Roll


Name Set Allocation
No Number Number
SET-1
1 12104929 Siruvuri Gnana Siddhik Varma RK21CHA01
SET-2
2 12104884 Arjun dev R RK21CHA02
SET-3
3 12105868 Akleema Fatima RK21CHA03
SET-4
4 12111997 Pogula Mythri RK21CHA04
SET-5
5 12104815 Gona Tony Satya Rohith RK21CHA05
SET-6
6 12104835 Pentakota Srinu RK21CHA06
SET-1
7 12104841 Jaswanth Singh Kumar Lankadasu RK21CHA07
SET-2
8 12104843 Naga Venkata Yaswanth Lankadasu RK21CHA08
SET-3
9 12104692 Tsaliki Mokshajna Nagendra RK21CHA09
SET-4
10 12104651 Jayant Bhardwaj RK21CHA10
SET-5
11 12104566 Garine Surya Teja RK21CHA11
SET-6
12 12104500 Challa Tejan Sree Chowdary RK21CHA12
SET-1
13 12103535 Kusumanchi Vinay RK21CHA13
SET-2
14 12103675 Dilpreet Singh Bhogal RK21CHA14
SET-3
15 12103080 R Akhil Reddy RK21CHA15
SET-4
16 12101377 Nikhil Mahana RK21CHA16
SET-5
17 12101448 Tanu Verma RK21CHA17
SET-6
18 12101812 Thallam Yeswath Kumar RK21CHA18
SET-1
19 12101119 Vaibhav Kohli RK21CHA19
SET-2
20 12100859 Abhinav Kumar RK21CHA20
SET-3
21 12100870 Kandula Chiru Hans Raj RK21CHA21
SET-4
22 12101012 Ayyala Tony Michael RK21CHA22
SET-5
23 12101871 Varadarajulu Koushik Sai RK21CHA23
SET-6
24 12102352 Neha Ashwinikumar Parhate RK21CHA24
SET-1
25 12103929 Velagalapalli Sai Kishore Chandra RK21CHA25
SET-2
26 12104536 Jagadesh S R RK21CHA26
SET-3
27 12104702 K Somanath Sai Teja Srinivas RK21CHA27
SET-4
28 12104957 Akshat Kumawat RK21CHA28
SET-5
29 12111698 Shloka singh RK21CHA29
SET-6
30 12100568 Mandeep Singh Gill RK21CHA30
SET-1
31 12100751 Mahendra Reddy K RK21CHA31
SET-2
32 12100863 C S Charithartha Sai RK21CHA32
SET-3
33 12104670 Suraj KM RK21CHA33
SET-4
34 12104847 Iskala Santhosh Kumar RK21CHA34
SET-5
35 12104916 Rishabh Jain RK21CHA35
SET-6
36 12109665 T Tanusree RK21CHA36
SET-1
37 12104464 Harshal Jain RK21CHA37
SET-2
38 12100315 Monish V RK21CHB38
SET-3
39 12102487 Madannagari Lokesh Simha RK21CHB39
SET-4
40 12102800 Pesarlanka Devendra Babu RK21CHB40
SET-5
41 12102585 Nikhil Pathak RK21CHB41
SET-6
42 12102610 S Surjith Subash RK21CHB42
SET-1
43 12103366 Kuruba Maheswaarr RK21CHB43
SET-2
44 12103123 Jandhyala Sai Kashyap RK21CHB44
SET-3
45 12103426 Pinjari Abdhulla RK21CHB45
SET-4
46 12104855 Satti Satya Reddy RK21CHB46
SET-5
47 12106169 L Mohammed Zeeshan RK21CHB47
SET-6
48 12105702 Gaurav Kumar RK21CHB48
SET-1
49 12105447 Veeramachaneni Sandeep RK21CHB49
SET-2
50 12105562 Abhishek Kumar RK21CHB50
SET-3
51 12104863 Surampalli Varun Kumar RK21CHB51
SET-4
52 12105093 Rambai Purandhar Srikanth RK21CHB52
SET-5
53 12105279 Gangulakurthi Hari Charan RK21CHB53
SET-6
54 12109507 Policherla Mohith Sreenivas RK21CHB54
SET-1
55 12109704 Kella Uday Kumar RK21CHB55
SET-2
56 12104518 Yalavarthi Vignesh RK21CHB56
SET-3
57 12110449 Hritik Khandelwal RK21CHB57
SET-4
58 12112945 Gangeddula Goutham Reddy RK21CHB58
SET-5
59 12105715 Aluru Srinivas Kasyap Kumar RK21CHB59
SET-6
60 12105798 Utkrist Ark RK21CHB60
SET-1
61 12106118 Beedupalli Pavan Sai Royal RK21CHB61
SET-2
62 12106957 Shibin Ziyad RK21CHB62
SET-3
63 12102603 Madala Venkatesh RK21CHB63
SET-4
64 12102632 Patel Manavkumar RK21CHB64
SET-5
65 12102758 Pogaku Ravi Narasimha RK21CHB65
SET-6
66 12103070 Udumula Jayanth Reddy RK21CHB66
SET-1
67 12103359 Pappu Mouli RK21CHB67
SET-2
68 12112233 Ankit Yadav RK21CHB68
SET-3
69 12106222 Komal Pasumarthy RK21CHB69
SET-4
70 12106749 Jundeep Sharma RK21CHB70
SET-5
71 12110942 Yanamaddi Vamshi RK21CHB71
SET-6
72 12103182 Vannala Rajesh RK21CHB72
SET-1
73 12100403 Poothi Chandrasekhar Reddy RK21CHB73

You might also like