0% found this document useful (0 votes)
31 views4 pages

CSE2001

Sjdj

Uploaded by

pirati.yaswanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

CSE2001

Sjdj

Uploaded by

pirati.yaswanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Say! VIT-AP SS UNIVERSITY Apply Knowledge. Improve Life!” QUESTION PAPER Name of the Examination: Intra Semester 2023-24 - FAT Course Code: CSE2001. Course Title: Data Structures and Algorithms Set number: 01 Date of Exam: e} ay, cA) Duration: 120 Total Marks: 60M Instructions: 1. Assume data wherever necessary. 2. Any assumptions made should be clearly stated. Qi. Explain Big-Oho and Big-Omega notations, Given f(a) = Sné+ 3n?-+2n?+ 4n + 1, Find O(n) and A(fin)). (10 Marks) Q2. Construct and evaluate the post fix ‘expression from the given infix expression S43924(948/4)*6 (10 Marks) 3. Construct the binary seach tee from the given set of elements and write the inorder, preorder and post order trayersals of the binary search tree. Assume root node to be. considered is 45. $9, 37, 22, 82,75, 45, 11, 9, 87, 67,31 (10 Marks) QA. Consider the Array A = [22, 18, 38,27, 40, 36,44, 8]. Apply Selection sort and write the array values after every pass and calculate the time complexity. Compare the number of swaps performed with bubble sort (10 Marks) QS. Given the key elements (32, 15, $5, 47, 30, 66, 24, 88, 99, 54) and hash table of size 11. Apply a. Quadratic Probing 'b. Double Hashing with secondary hash function as Hasha(K) = 7 —(K9%7) to insert the keys. ‘Show the steps for each insertion and resulting hash table, (10 Marks) Q6. Find the minimum spanning tree for the Graph G using Prim’s Algorithm. Starting vertex is 0. seme) ®@-@-@ @® - @®-.+ © @ -_@ - ® [Page QP MAPPING ato, | Module | co mapped iat es PSO Mapped | ~ Marks ai it a 14,12 £2 42 70 @ 2 2 16,12 12 42 10 3 3 3 12,3,6 42 42 10 a 4 4 12,12 12 12 10 cy 3 2 1,612 12 412 10 as 6 3 12,36 12 12 10 2IPage ty VIT-AP UNIVERSITY QUESTION PAPER Name of the Examination: Intra Semester 2023-24 FAT Course Code: €S€2001 Course Tite: Data Structures and Algorithms Set number: 02 daeorexam: JQ}{124 CE) Duration: 120 Total Marks: 6om Instructions: 1. Assume data wherever necessary. 2. Any assumptions made should be clearly stated, Qt. Given an array of integers, write an algorithm to find the second-largest element present in the array. Calculate the time complexity and space complexity of the algorithm, Example: Input: art] = {12, 35, 1, 10, 34, 11) Output: The second largest element is 34, (10 Marks) (2. Consider the following doubly linked list in which nodes data is in sorted order. Show the steps {o insert the following data 3, 14 and 25 into the sorted doubly linked list and delete 15 fram the sorted doubly lined list. (10 Marks) heed node Last node | | Xs ow ms kX 3. Construct an AVL tree by inserting the lst of elements (150, 155, 160, 115, 110, 40, 120,145, 130, 147, 170, 180} and write the preorder and post order traversals of the constructed AVL. tree, (10 Marks) Q4 Consider the String Branch = “COMPUTER SCIENCE”, Apply the Merge Sort to sort the characters of the string in alphabetical order and mention the Best-case, Average-case and Worst-case time complexity of Merge Sort algorithm. (10 Marks) QS. Write an algorithm / pseudo code for Binary Search algorithm. Illustrate the working of Binary search on the following set of elements to search for the Keys 86 and 14: 9. 11, 13, 15, 25, 28, 37, 45, 55, 67, 74, 84, 86,94, 95,99 (10 Marks) 11Page Q6. Consider the following Graph G, apply Dijkstra’s’ algorithm to calculate single — source path shortest path from S to every other node, (10 Marks) No, | Mode | co mapped a Meppea | PSOMapped | Marks an i I 14,12 32 a2 70 a2 2 z 16,12 32 aja 10 B 3 3 12,3,6 Lz 42 10 aa 4 4 12,12 12 12 10 as 5 2 1612 12 42 10 a6 é 3 72,3,6 12 22 Fa 2[Page

You might also like