DS Previous PPR

You might also like

Download as pdf
Download as pdf
You are on page 1of 8
Ew ete N.B: Ql Q2 Q3 Q4 Qs Q6 APRS R bIect Code: $0923 / Data Structure wep Wy (7) ww SOPL jot 20875 . 4 é f <2 d f Tofal Marks: 80 ay, (G Hours) es (1) Quest ae 2) Attempt any three questions out of the remaining five questions. (3) Figures to the right indicate full marks. y (4) Make suitable assumptions wherever necessary. (a) Compare linear and on-linear data structilés. (05) (>) Explain the advantage of circtilar queue over linear queue. Write a (05), function in C language to inse ment in cis e (©) Define binary search tree: (05) search tree if node has both the children. (2) Write a C function fe dn tig eg ‘[05] (a): Construct AVL tree for the following sequence: 4 (oy ¢ 67,34,90,22,45,11,2,78,37,122 & (b) Write algorithm for postfix evaluation. Demonstrate the’same step by step for the expression: 967 *2/- (a) Write a program to perform following operations on a circular linked list: [10] i) insert a node from the efid of the list, i) delete first node, j iii) count the number of nodes with even values, iv) display the list’ (b) Write a C program to simulate linear queue as linked list. {10} (@) Construct Huffman tree [10] given below with frequen: «* [Symbor_ x Frequency 20 [17 [33 g)25 [a0 (b) Explain the various ways fo represent graph in the memory if (©) Construct binary search tre from give traversal seque [03] Intorder traversal | D. BIA [Cc JF |G HT Pre-order, E [pyc A HI [5 [05] ‘waversal ry (@) Apply linear probing to hash the following values in ahash table of size [10] 11 and find the number of collisions: 67,44,90,12,83,52,23,87,79. (b) Define topological sorting. Perform topological sorting for the following _{10] Q—® Teo (2) Construct B tree ofc 3 ing the following given elements as: [10] T1,97,15,64,53,1426,49,82, ‘Show the B tree at each of insertion. (b) Write a function in C for DFS traversal of graph. Explain DFS graph (19) traversal with suitable example. 12055 © Page lofi (00F72FA1FD894CEBSOE3095S1CC67FCE _"S_sia&#H—=5$5=E=sses=s (, Cprarap 254 4 De\ns, Paper / Subject Code: 49303 / DATA STRUCTURES Ww Time: 3 Hours N.B. (1) Question No.1 is Compulsory (2) Attempt any three questions out of remaining five questo (3) Make suitable assumptions wherever necessary (4) Figures to the right indicate full marks 1. (a) Explain ADT with an example. (b) Differentiate between Static and Dynamic: representation of Date Structure. 4) (c) Write a *C’ program to implement Binary Search using reoursion (d) Discuss practical applications of Queues - re 2 - : * 10)” 2. (a) Write a *C’ program to implement ‘STACK using arrays 7 (Q)What are the different methods of File LO Sn ‘C’ language? What bran functions are supported by “C” language to doabis? = (10) 2. (@ What are the advantages of Linked: lis over anay? Write a°C’ proba to implement Queue ADT using Linked-List 10) 1 search with a suitable exaiaple: What arethe (b) Explain indexed Sequential advantages and disadvantages of Indexed Sequential search (10) 3. (@) Write a °C program to create @“Singly Linked List’. The ADT shoul8 suppor 1 the following operations (@ Greating.a Link Li Gi) Inserting & node after e spec (ii) Deletinga node SF ~ (iv) Displaying the list Sac (Explain the method of Huffman Encoding APPS Huffman encoding method for the ec ntence “MAHARASHTRA”. Give Hoffman code for each symbol (10) ate Binary Search Tree. Show BST for the following input: $5. (a) Write a °C° program to cre SS 10,05314,22.17,01,08 (10) ghar is the se of hashing? Show hash ible entries for the ven dataset wing Linear roping and Quadratic Probing: 12.5,67,88,27,78,20,62,36.55. (10) (20) & Write Short notes on (any two) (a) Threaded Binary Tree (b) BFS Traversal (c) Doubly Linked-list 69389 EESBC0983D326D1 14F812BDFD26CDFS8 Page 1 of 2 ye Paper / Subject € VOR Code: 36285) Sero {ime three Hours Umarke-20) NBC) Question No1s Compulsory (2) Attempt any three questions out of remaining five questions (3) Make suttable assumptions wherever necessary (4) Figures to the right indicate full marks 1 (a) Explain ADT with an example. oy (b) Differentiate between Static and Dynamic Data Structure “6 (6) Writea “C* program to implement Binary Search using recutsion 6 (4) Discuss practical applications of Queues 6) 2. (a) Write a ‘C* program to implement STACK using arrays (19) (b)What are the diferent methods of File VO in °C’ language? What library Functions ate supported by °C” language todo this? (10) 3. (a) What are the advantages of Linked list over array? Write a °C” program to implement Queue ADT using Linked List (10) (b)Explain indexed Sequential search with a suitable example. What are the advantages and disadvantages of Indexed Sequential search (10) 4. (a) Write a °C program to create a “Singly Linked List” ADT. The ADT should support the following: (10) (i) Creating a Linked List (ii) Inserting a node after a specifie node (iit) Deleting a node (iv) Displaying the list (b)Explain the method of Huffman Encoding. Apply Huffman encoding method for the sentence "MAHARASHTRA". Give Hufliman code for each symbol. (10) 5. (a) Write a ‘C’ program to create Binary Search Tree. Show BST for the following Input: 10,5,14,22,1731,8 ~~ (10) (0)What is the use of hashing? Show hash table entries for the given dataset using Linear Probing and Quadratic Probing: 12,45,67,88,27,78,20,62,36,55 (10) 6, Write Short notes on (any two) (a) Threaded Binary Tree (b) Explain BPS algorithm with example (©) Doubly Linked list. (20) 11297£:767DF520ADB9ICEFSSOR6CIOSA$ Comp CBsas @ Ps, 7 QP COD: (3 Hours) Ds NB: (1) Question No.1 is Compulsory, (2) Attempt any three questions of th: G) Figures to the right indicate full mare ee Aeations: (4) Make suitable assumptions wherever necessary wi proper justification. Marks : 80 1. (a) Define data structure ? Give its classification, (b) What are the advantages of using dynam bites ci lynamié memory alloCation over staticmemory $ (©) Describe Multiway Search Tree with.an example. > (d) Write a function in C to implement Shell Sort, 5 2. (a) Discuss file /O operations in © programiining language. é 8 (©) Write C program to perforin polysiomial addition using Linked List. 12 3. (a) Whatare different type [ew can-we use the quene data structure for 10 simulation. Ss f () Wie ni eee 8s one expression. 10 gay eC ite anode from a Binary Search Tree. The program 10 im to implement the BFS traversal of a graph. 10 Raa cman ina table of size 11. Use any two collision resolution 10 2FEE6430A72SD77A0463A14AS3E1C9F7 SE ——ee \Z a fe SGS)— 08 @ “To paper /Subject Code: 49303 /DATA. STRUCT cosas Duration: 3 hrs Total Marks: 80 {1) question No. 1s Compulsory {p)attempt ay three questions of the remaining five questions {3) Figures to the right indicate full marks goss: (a) Make suitable assumptions wherever necessary with proper. justifications. NB (a) What isa data structure? Explain with examples {b)What are the advantages of using dynamic mem: allocation? {c) Describe Mulivay Search Tree with an exa (4) Write a function in C to implement Shell 2, (a) Discuss file I/O operations in C prograri (bJExplain sparse matrix as application of I ie Huffman code for each (08) Kk ith an example, (08) ide from'a Binary Search Tree. The program should (12) paper /S uration: 3 Hours : e APcedessng OK (2) Question No.2 's Computs Fotal Aeron any three omtony "3 Maa 20 {G) Figures to the right indie, NB iOns of the rey ate full marke NE FYE Questions 'Ons wherever nece: re various operations possible on da FY With proper justifications (ay what aia ta struc oywrat are different ways of representing a Gar tetas? tere Tis wih an example fata structure ona computer =) junction in C to implem ter fos i) Write a function plement binary ) ( ry search, ms ack data structure to check (05) 2. (ajuse stad well-formedne: (or ession. wete C rogram for the same, *iness of parenthesesin an algebraic [njgiven the frequency forthe following symbols, compute th (10) symbol. 'e Huffman code for each ‘Symbol Ta Tere (10) Frequency | 24 [a2 ao laT es f) Write aC program to implement priority queve usin i. Inserting in a priority queue @ i Deletion from a queue i Displaying contents of the queue (uy what are expression trees? What are ts advantages? Derive the expression tre forthe following algebraic expression: (a (b/c)) * ((d/e)-A (08) 4. (a) Write a C program to represent and add two polynomials using linked ist. (2) {b) How does the Quicksort technique work? Give C function for the same. (08) for the same. (05) 5. (a) Whatis a doubly linked lst? Give C representation f (b) Given the postorder and inorder traversal of a binary tree, construct the original tree: Postorder: DEFBGLIKHCA (10) inorder: DBFEAGCLIHK {cl what is hashing? What properties should a good hash function demonstrate? (05) 6 (a}Given an arcay int al] ={69, 78, 63, 98, 67,75, 66.90, 81). Calculate address of al5) f base address is 1600. (02) han of a graph. Explain the code wit (20) (0) Give C function for Breadth First Search Traversal example 1 ingly linked li ram should be able to {c) Write a C program to implement 2 sing! nked list. The program sho ai perform the following operations the end of the list {ij insert a node at yent {ii Deleting a particular elem (ii) Display the linked lst page rofl 6 6) Sm ~ 4) Time: 3 Hours Marks: 80 NB: (1) Que (2) Attemp?s jucstions of the remaining fiv 7 Griguestothe nght indicate fullmatks (4) Make suitable assumptions wherever necessary with proper justifications Q.1 (a) Explain Linear and Non-Linear data structures. Oy (b) Explain Priority Queue with example ) {c) Write a program in °C” to implement Quick sort (10 Q2 (a) Write « program to implement Circular Linked List, Provide the following 5 operations: (40) ? (i) Insert anode - (ii) Delete a node (iv) Display the list (b) Explain Threaded Binary tree in detail Y (10) Q3 (a) Explain Huffinan Encoding with suitable example (10) (by Write a program in °C” to check for balanced parenthesis in an expression using stack (10) QA (a) Write @ program in °C" to implement Queue using array (10) {b) Explain different eases for deletion of @ node in binary search we. Write function for each case (10) 5 (a) Write a program in “C* to implement Stack using Linked-List .Perform the following operations: (10) Gi) Push (ii) Pop ’ (iii) Peek (ii) Display the stack contents (b) Explain Depth First search (DFS) T function for DFS aversal with an example, Write the recursive (10) Q.6. Write Short notes on (any two) 20) (a) Application of Linked-List (b) Collision Handling techniques (c) Expression Tree (d) Topological Sorting Polynomial addition 69390 gsassAADIZBCDONBB26DESSCDSBHOGE —_ C Mest -. ay eMAULD steals “ ™ ovation 8 Ww ‘ 1 question No.1 Compataoy S18 oe" ui Gta ay three gets srhe WON eee {)) Figures t0 tho FighC indioate 8 flve questio 1 (a) Define Dat Stretwe: itFrentite Hear and ine a {)_Weiton € feo implement sertion sort Vinge ata structures with example,» -¢8) {What aro different ways to represent SOHNE graphs in meni 49 (a) What is expression too? Derive m expreniay eet eine ‘ “6 iv horoynero & (0) Whats Mashing? Hash the followin atte : ; ings lata ble o in ry quadratie probing, Also find the numberof Sn AE OUR ERS SN 63, 82, 94, 77, 53, 87, 28'$5,cHVA4! od OS Sos (b) Write a recursive funotion to perforin SOON Oar ae Se rforin pre-ofder traversal Othe bindery Ue (©) Given an array int al] = (23,55,63,89,45,67,85,99), carat ot 5} ita a address is $100, kemcoCesLifinie: C2) 4 (a) Write a € program to convert ink expressionto posts expreston. (40) (10) (b) Demonstrate step by step lnseeion oft following eemeatsinan AVY ee, 63, 9, 19,18,108,99,8 1,45 ¥ firing flowing functions (12) 4 (a) Write a € prog 16 inypenien eowlat Jnke Fish slngert w nod ja he boii. ‘ ae UR a ® Wainga padre Co implement Dodbe Ended Queue (12) ra binary tree, construct the original ree: (8) r SDERBGLIKUCA lot 'pBrer LINK Ni sin alate eStore ny 0) Er Aree jon anc adiion asing linked Hist sanangasDy?SDCIIBIAT2STESSECA

You might also like