[go: up one dir, main page]

0% found this document useful (0 votes)
60 views14 pages

Ds Pyq

The document outlines a BTECH examination paper for Data Structures, covering various topics such as data structure definitions, algorithms, and tree structures. It includes multiple sections with questions on binary trees, sorting algorithms, graph representations, and recursion. Students are required to attempt all sections and provide detailed answers to the questions presented.

Uploaded by

Aman Ali
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)
60 views14 pages

Ds Pyq

The document outlines a BTECH examination paper for Data Structures, covering various topics such as data structure definitions, algorithms, and tree structures. It includes multiple sections with questions on binary trees, sorting algorithms, graph representations, and recursion. Students are required to attempt all sections and provide detailed answers to the questions presented.

Uploaded by

Aman Ali
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/ 14
Printed Pages: 02 Paper ID: ‘Sub Code: RCS305 dL. 0 Time: 3Hours Note: Attempt all Sections. Assume missing data, if any. 1, Attempt all ques 0\4 Roll No. BTECH (SEM II) THEORY EXAMINATION 2017-18 DATA STRUCTURES Max. Marks: 70 ‘SECTION A 2x7=14 in bri a Define the term Data Structure. List some linear and non-linear data structures stating the application area where they will be used. b. Discuss the concept of “successor” and “predecessor” in Binary Search Tree. c Convert the following arithmetic infix expression into its equivalent postfix expression. Expression: A-B/C+D*E+F a Explain circular queue. What is the condition if circular queue is full?” e Calculate total number of moves for Tower of Hanoi for n=10 disks. f. List the different types of representation of graphs. 8 Explain height balanced tree. List general cases to maintain the height. SECTION B 2, Attempt any three of the following: Tx3=21 a, What do you understand by time space trade off? Explain best, worst and average case analysis in this respect with an example b. Use quick sort algorithm to sort 15,22,30,10,15,64,1,3,9,2. Is it a stable sorting algorithm? - Justify. ¢. Define spanning tree. Also construct minimum spanning tree using prim’s algorithm for the given graph. 4d, Define tree, binary tree, complete binary tree and full binary tree. Write algorithms or function to obtain traversals of a binary tree in preorder, postorder and inorder. . Construct a B-tree on following sequence of inputs. 10, 20, 30, 40, 50, 60, 70, 80, 90 Assume that the order of the B-tree is 3. SECTION C 3. Attempt any one part of the following: Tx1=7 1|Page (a) What are the various asymptotic notations? Explain Big O notation. (b) Write an algorithm to insert a node at the end in a Circular linked list. 4, Attempt any one part of the following: Tx1=7 (a)What is a Stack .Write a C program to reverse a string using stack. (b)Define the recursion, Write a recursive and non recursive program to calculate the factorial of the given number. 5. Attempt any one part of the followin; Tx1=7 (a) Draw a binary tree with following traversals: Inorder: BCAEGDHFIJ Preorder: ABC DEGFHIJ (b) Consider the following AVL Tree and insert 2, 12, Zand 10 as new node. Show proper rotation to maintain the tree as AVL. 6. Attempt any one part of the following: Tx1=7 (a)What is a Threaded Binary Tree? Explain the advantages of using a threaded binary tree. (b)Describe Dijkstra’s algorithm for finding shortest path, Describe its working for the graph given below. 7, Attempt any one part of the following: Tx1=7 (a)Write short notes on: i, Hashing Technique ii, Garbage collection ()Explain the following: Heap Sort Radix Sort 21Pa Printed Pages: 02 Paper Id: | i[ i] 0 3] | 3 Roll No. |_| [ae] nfm B. TECH. (SEM II) THEORY EXAMINATION 2018-19 DATA STRUCTURES Time: 3 Hours Total Marks: 70 Note: 1, Attempt all Sections. If require any missing data; then choose suitably SECTION A 1, Attempt aff questions in brief. 2x7=14 a, How the graph can be represented in memory? Explain with suitable example. b. Write the syntax to check whether a given circular queue is full or empty? c. Drawa binary Tree for the expression: A * B - (C + D) * (P/Q) d. Differentiate between overflow and underflow condition in a linked list. e. _ What do you understand by stable and in place sorting? f. Number of nodes in a complete tree is 100000, Find its depth. What is Recursion? Give disadvantages of recursion. SECTION 2. Attempt any three of the following: 7x3=21 a. What do you understand by time and space trade off? Define the various asymptotic notations. Derive the O-notation for linear search, b. Consider the folloaying infix expression and convert into reyerse polish notation using stack: A +(B * C-(D/E*F)* H) ¢. Explain Huflinan algorithm. Construct Huffman tree for MAHARASHTRA with its optimal code 4. What is a height balanced Tree? Why height balancing of Tree is required? Create an AVL Tree for the following elements: a, z, b, y, ¢, x. dw, @, Vf €, Write the Floyd Warshall algorithm to €6mpute the all pair shortest path. Apply the algorithm on following graph: MANISH KUMAR JHA | 29-Dec-2018 09:10:47 | 117.55.242.134 SECTION C Attempt any one part of the following: 7x1=7 (2) Write a program in ¢ to delete a specific element in single linked list, Double linked list takes more space than single linked list for storing one extra address. Under what condition, could a double linked list more beneficial than single linked list. (b) Suppose multidimensional arrays P and Q are declared as P (-2: 2, 2: 22) and Q (1:8, -5: 5, -10: 5) stored in column major order (i) Find the length of each dimension of P and Q (ii) The number of elements in P and Q (iii) Assuming Base address (Q) = 400, W=4, Find the effective indices E1, E2, E3 and address of the element Q [3, 3, 3]. Attempt any one part of the following: Tx1=7 (a) Explain Tower of Hanoi problem and write a recursive algorithm to solve it. (b) Explain how a circular queue can be implemented using arrays. Write all functions for circular queue operations. Attempt any one part of the following: 7x1=7 {@) Write the algorithm for deletion of an el a binary search tree. (b) Construct the binary tree for the folloy 7,* In-order: Q, B, K, C.F, A, G. P, Na Preorder: G, B, area rau a Find the Post Order of the Tre a’ if Attempt any one part of the folloainz: Kel7 Ne (a) By considering vertex sas source vertex, Find the shortest pats all other vertices in the followtig graph using Dijkstra’s algorithms. Siiqy*all the steps. (b) Explain in detail about the = dhversal techniques with suitable examples. Attempt any one part of the foie: Tx1=7 (a) Write algorithm for-@iljck sort. Trace your algorithm on the following data to sort the list: 2, 13, 4421, 7, 56, 51, 85, 59, 1, 9, 10. How the choice of pivot clement effects the'efficiency of algorithm. (b) Construct a B-tree of order 5 created by inserting the following elements 3, 14, 7, 1, 8, 5, 11, 17, 13, 6, 23, 12, 20, 26, 4, 16, 18, 24, 25, 19 Also delete elements 6, 23 and 3 from the constructed tree. MANISH KUMAR JHA | 29- -2048 09:10:47 | 117.556.242.131 Printed Page 1 of 2 Sub Code:KCS301 Paper Id: 110321 Roll No: B. TECH. (SEM IL) THEORY EXAMINATION 2019-20 DATA STRUCTURES Time: 3 Hours Total Marks: 100 Note: 1, Attempt all Sections. If require any missing data; then choose suitably. SECTION A 1, Attempt al! questions in brief. 2x10=20 Qno. Question Marks | CO ‘a. | How can you represent a sparse matrix in memory? 2 [cor 'b.__| List the various operations on linked list. 2 [cor ¢.__ | Give some applications of stack. 2 [cor [d__| Explain Tail recursion. 2 [cor ¢.___ | Define priority queue. Given one application of priority queue. 2 [03 £___| How does bubble sort work? Explain. 2 [603 ‘g.___| What is Minimum cost spanning tree? Give its applications. 2__| Coa h.__ | Compare adjacency matrix and adjacency list representations of graph. [2 | CO4 i | Define extended binary tree, full binary tree, strictly binary tree and{2 | COS |, complete binary tree. AY cl. i Explain threaded binary tree. R S 2. Attempt any three of the followin; a0. A Question nO a ‘What are the merits and-dpivérits of array? Given two arrays of integers in ascending order, develop an algorithm to merge these arrays to-form a third array sorted in ascending order. A b. | Write algorithm for Push and Pop operations in stack. Transform the | 10 | Coz following expression into its equivalent postfix exprestjop-using stack: A+(B*C-(D/ETF)*G)*H a ©. | How binary search is different from linear search? Apply binary search | 10 | CO3 to find item 40 in the sorted array: 11, 22, 3033, 40, 44, 55, 60, 66, 77, 80, 88, 99. Also discuss the complexity o! search. 4. | Find the minimum spanning tree in the %9Powing graph using Kruskal’s | 10 | CO algorithm: A - o—X© YIN IN “NANA 8 eo 2 e. | What is the difference between a binary search tree (BST) and heap? For | 10 _| Cos a given sequence of numbers, construct a heap and a BST. |__| 34, 23, 67, 45, 12, 54, 87, 43, 98, 75, 84, 93, 31 1|Page * Printed Page 2 of2 Sub Code:KCS301 Paper Id: 110321 Roll No: SECTION € 3. Attempt any one part of the following: 1x10=10 om Question Marks | CO a What is doubly linked list? What are its applications? Explain howan [10 | Col | element can be deleted from doubly linked list using C program. | b. | Define the following terms in brief: 10 | coi (i) Time complexity (ii) Space complexity (ii)__ Asymptotic Notation (iv) Big O Notation 4. Attempt any one part of the following: 1x10=10 Quo. a mal ‘Question in Marks | CO | a. | (i) Differentiate between iteration and recursion. 10 | coz (i) Write the recursive solution for Tower of Hanoi problem. b. | Discuss array and linked representation of queue data structure. What is [10 | CO2 dequeue’? a) 3. Attempt any one part of the following: 1xi0=10 Oro Tussion Marks [CO] following set of elements:25, 57, 48, 37, 12, 92, 86, 33 a | Why is quick sort named as quick? Show the steps of quick sort on the [10 [ CO3 | ‘Assume the first element of the list to be the pivot @lement._ | b. What is hashing? Give the characteristics .of hash function. Explain} 10 | COs)” collision resolution technique in hashing. \ 6. Attempt any one part of the followin ho. ~Qupaidg i ‘a__| Explain warshall’s algorithm with the’help of an example, b. [Describe the Dijkstra algotithnt to find the shortest path. Find the shortest path in the following graph with vertex °S” as source vertex.) 7. Attempt any one part of the following: 1x10=i0 ‘Qno. Question” Marks [CO a. | Can you find a unique tree when any two traversals are given? Using the | 10 _ | COS following traversals construct the eofrésponding binary tree: INORDER: HKDBILEAFE€MIJG PREORDER: ABDHK ELLCFGIM Also find the Post Order traversal of obtained tree. b. ‘What is a B-Tree? Generate a B-Tree of order 4 with the alphabets | 10 cos (letters) arrive in the sequence as follows: agibkdhmjesirxelntup 2[Page ia-SiN puuanhidick Sai” Kee cadmine Macatee 0 a ee ak ANCA 00 PAPER ID-311107 Time: 3 Hours Printed Page: 1 of 2 Subject Code: KCS301 Roll No: B.TECH (SEM Ill) THEORY EXAMINATION 2020-21 DATA STRUCTURES Note: 1, Attempt all Sections. If require any missing data, then choose suitably 1 SECTION A Attempt all questions in brief, Total Marks: 100 2x 10=20 Qne. Question Marks co Define Time-Space trade-off. Differentiate Array and Linked list Explain Tail Recursion with suitable example. ‘Write the full and empty condition for a circular queue data structure Examine the minimum number of interchanges needed to convert the array 90, 20, 41,18, 13. 11, 3, 6, 8,12, 7, 71, 99 into a maximum heap. Differentiate sequential search and binary search ‘Compute the Transitive closure of following graph. ® > Ket = Write short notes on adjacency multi list representation a Graph. ‘What is the importance of threaded binary tree? Write short notes on min heap. w[S]s| ‘SECTION B Attempt any three of the following: Qo Question Marks CO Consider a multi-dimensional Array A[90] [30] [40] with base address starts at 1000. Calculate the address of A[10] [20] [30] in row major order and column major order. Assume the first element is stored at A[2][2][2] and each element take 2 byte 10 Evaluate the following postfix expression using stack 239*+23%-62/+ , show the contents 6feach and every steps. also find the equivalent prefix form of aboye-xpression, Where * is an exponent operator Explain any three commonly uga@hash function with the suitable example? A hash function H defined as H(key) =key%7, with linear probing, is used to insert-the-Key 37,38,72,48,98,11,66 into a table indexed from 0 to 6. what will be the location of key 11? Justify your answer, also count the total number of collisions in this probing 10 Write an algorithm for Breadth First search (BFS) and explain with the help of suitable example 10 If the in order ofa binary tree is B,I,D,A,C,G.E,FLF and its post order is LD.B,G,C H.F,E,A then draw a corresponding binary tree with neat and clear steps from above assumption 10 1|Page Printed Page: 2 of 2 0 00 0 subjet Cae: KOS PAPER ID-311107 Roll No: SECTION C 3. Attempt any one part of the following: Tro Question Marks [CO a | Consider the two dimensional lower triangular matrix (LTM) of order [10 | 1 N ,Obtain the formula for address calculation in the address of row major and column major order for location LTM[j][k], if base address is BA and space occupied by each element is w byte b__| Write aC program to insert a node at k™ position in single inked list [10 [1 4. Attempt any one part of the following: Tro. Question Marks | CO a | Convert the following infix expression to reverse polish notation | 10 expression using stack rib? Ang 2a b__| Write aC program to implement stack using single linked list, wo 2 5. Attempt any one part of the following: ‘Ono. ‘Question Marks | CO a | Write an algorithm for merge sort and apply on following elements [10 _[[3. 45,32,65,76,23,12,54,67,22,87. b___| Write a C program for Index Sequential Search 109" [3 6. Attempt any one part ofthe following: Qn. Question Marks | CO a | Describe Prim's algorithm and find the cost of minimum spanning tree [10 | 4 using Prim’ s Algorithm. b.__ | Apply the Floyd warshall’s algorithmyin above mentioned graph 10 ‘(4 (ie. in Q.no 6a) 7. Attempt any one part of the following: Qno. Question ‘Marks [CO a. | Write Short notes of following 1 [5 (a) Extended Binary Trees (b) Complete Binary Tree (c) Threaded Binary Tree. b__| Insert the following sequence of elements into an AVL tee, starting [10 | 5 with empty tree 71,41,91,56,60,30,40,80,50,55 also find the minimum array size to represent this tree 21 Page M100 0 0 subject Codes KCSSDL PAPER ID-ATI677 Roll No: BTECH (SEM IL) THEORY EXAMINATION 2021-22 DATA STRUCTURE Time: 3 Hours Total Marks: 100 Note: Attempt all Sections. If you require any missing data, then choose suitably. TION A 1. Attempt ail questions in brief. 2X10 =20 QNo ‘Questions CO. (@)__| Convert the infix expression (A¥B) *(C-D) SE*F to postfix. Give the answer | I without any spaces. (b)__[ Rank the following typical bounds in increasing order of growth rate 2 O(log n), O(n'), 00), Of? log n) ()__| Draw the binary search tree that results from inserting the following numbers in | 3 sequence starting with LI 11,47, 81,9. 61, 10, 12. (@_| What does the following recursive function do for a given Linked List with fist | 4 node as head? void funl (struct node* head) retum: fun (head->next) printt("Yed ", head->data, ()_| Define a sparse matrix, Suggest a space efficient representation for space matrices, | 5 (_| List the advantages of doubly linked list over single Tinked list 7 (@)_| Give example of one each stable and unstable Sorting techniques, 2 (hy _| Write advantages of AVL tree over Binary Search Tree (BST) 3 (_| What is tail recursion? Explain witra suitable example @ @_| Waite different representations pfgraphs in the memory 5 SECTION B 2. Attempt any three of the following: 10X3 =30 QNo Questions © (@_| Wate advantages and disadvantages of Tinked Tist over arrays. Write w ‘C function | 1 creating new linear linked list by selecting alternate elements oft Trier linked list (| Write algortims of insertion sor. Implement the sume omjhe following numbers, |Z also calculate its time complexity. 13,16, 10. LL, 4, 12, 67) T _ } Differentiate between DFS and BFS. Draw the breadth Fist Tree Tor the above] 3 raph (@_| Differentiate between liner and binary search algorithm. Write a recursive function | 4 to implement binary search (| What is the significance of maintaining threads in Binary Search Tree? Weite an | 5 algorithm to insert a node in thread binary tee. SECTION C 3. Atempt any one part of the following: 0X1 QNo Questions (@)__ | Suppose a three dimensional array A is declared using A[I-10, 5.5, -10:5) i (i) Find the length of each dimension and the number of elements in A (ii) Explain Row major order and Column Major Order in detail with explanation formula expression M100 0 0 subject Codes KCSSDL PAPER ID-ATI677 Roll No: BTECH (SEM IL) THEORY EXAMINATION 2021-22 DATA STRUCTURE wo iscuss the representation of polynomial of single variable using linked list. Write | T functions to add two such polynomials represented by linked list. 4 Aitempt any one part of the following: T0X! QNo Questions’ (@)__ | (@ Use the merge sort algorithm to sort the following clements in ascending order. | 2 13, 16, 10, 11, 4, 12, 6,7, ‘What is the time and space complexity of merge sort? ii) Use quick sort algorithm to sort 15,22,30,10,15,64,1,3,9,2. Is ita stable sorting algorithm? Justi ()_ |) The keys 12, 17, 15, 2, 5, 43, 5 and 15 are inserted into an initially empty hash | 2 table of length 15 using open addressing with hash function h(k) = k mod 10 and linear probing. What isthe resultant hash table? (Gi) Differentiae between linear and quadratic probing techniques, Aifempt any one part of the following: TOXT QNo Questions: (@)__| Use Dijkstra’s algorithm to find the shortest paths from source to all other vertices in the following graph. 1) _| Analy Prin’s algorithm to ind alminimum spanning tre in the folowing weighed | 3 graph as shown below b a 6 —_Sifempt any one part ofthe following: Txt = 10 ‘QNo ‘Questions €O (@) | (@) Write an erative function to search Rey in Binary Search Tree (BST). 7 (ii) Discuss disadvantages of recursion With some suitable example DH __] What is Recursion? 7 (i)Wnite a C program to calcilaie factorial of number using recursive and non- recursive functions. 1 Aifempt any one part of the following: T0XI=10 (QNo Questions’ CO (@) | @ Why does time complexity of search operation in B-Ivee is better than Binary | 5 Search Tree (BST)? (ii) Insert the following keys into an initially empty B-tree of order 5 aghbkdhmjiesinxelntup (ii) What will be the resultant B-Tree after deleting keys}, tand d in sequence? 7) | @ Design a method for Keeping two stacks within a single linear array so that | 5 neither stack overflow until all the memory is used (ii) Write a C program to reverse a string using stack Printed Pages: 2 ‘Sub Code: KCS- 301 Paper ld: [233380 Roll No. [ B.TECH. (SEM Ill) THEORY EXAMINATION 2022-23 DATA STRUCTURE Time: 3 Hours Total Marl Note: 1, Attempt all Sections. If require any missing data; then choose suitably SECTION A. Attempt all questions in brief, 2x 10=20 (@) (b) ©) @ e) , (g) (h) a wo (a) (b) (©) @ © Define best case, average case and worst case for analyzing the complexity of a program Differentiate between binary search tree and a heap Write the condition for empty and full circular queue What do you understand by tail recursion? Construct an expression tree for the following algebraic expression (a-b)/((e*d) +0) Differentiate between internal sorting and external sorting What are the advantages and disadvantages of array over linked list? Write an algorithm for Breadth First Search (BFS) traversal of a graph. Ina complete binary tree if the number of nqdes is 1000000. What will be the height ‘of complete binary tree Which data structure is used to perform recursion and why? SECTION. Attempt any three of the followings 1043-30 Assume that the declaration ofmmulti-dimensional arrays X and Y to be, X (2:2, 2:22) and ¥ (1:8,-84, *10:5) (i) Find the length of each dimension and number of elements.in'X and Y (ii) Find the address of element Y (2, 2, 3), assuming Base address of Y = 400 and each element occupies 4 memory locations What is Stack? Write a C program for linked list implementation of stack Write an algorithm for Quick sort. Use Quick sort,algorithm to sort the following, elements: 2, 8 7, 1, 3, 5,6, 4 Write the Dijkstra algorithm for shortest path in.a graph and also find the shortest path from *S’ to all remaining vertices of graph in the following graph: ‘The order of nodes of a binary tree in inorder and postorder traversal are as follows’ Inorder: B, I, D, A, C, G, E, H, F. Post order: I, D, B, G, C,H, F, E, A. () Draw the corresponding binary tree (ii) Write the pre order traversal of the same tree SECTION C 3. Attempt any one part of the following: 10x1=10 (a) How to represent the polynomial using linked list ? Write a C program to add two polynomials using linked list. (b) Discuss doubly linked list. Write an algorithm to insert a node after a given node in singly linked list 4. Attempt any one part of the following: 10x1=10 (a) Write an algorithm for converting infix expression into postfix expression. Trace your algorithm for infix expression Q into its equivalent postfix expression P, QA+(B*C-(D/ E*R*G)*H (b) What is circular Queue? Write a C code to insert an element in circular queue? 5. Attempt any one part of the following: 10x1=10 (a) What is Hashing? Explain division method to compute the hash function and also explain the collision resolution strategies used in hashing (b) Write an algorithm for Heap Sort Use Heap sort algorithm, sort the following sequence: 18, 25, 45, 34, 36, 51, 43, and 24, 6. Attempt any one part of the following: 10x1=10 (a) What is spanning tree? Write down the Prim’s@lgorithm to obtain minimum cost spanning tree. Use Prim’s algorithm to find the minimum cost spanning tree in the following graph: (b) Write and explain the Floyd Warshall algorithm to find the All pair shortest path. Use the Floyd Warshall algorithm to find shortest path among all-the vertices in the given graph 7. Attempt any one part of the following: 10x1=10 (a) Discuss left skewed and right skewed binary tree. Construct an AVL tree by inserting the following elements in the order of their occurrence 60, 2, 14, 22, 13, 111, 92, 86. (b) What is B-Tree? Write the various properties of B- Tree Show the results of inserting the keys F, 8, Q, K ,C, L, H, T, V, W, M, R, N, P, A, B in order into a empty B-Tree of order 5. Printed Page: 1 of 2 A001 A Subject Code: BCS301 PAPER |D-311405 Roll No: BIECH (SEM III) THEORY EXAMINATION 2023-24 DATA STRUCTURE TIME: 3HRS M.MARKS: 70 Note: 1, Attempt all Sections. If require any missing data; then choose suitably. SECTION A 1. Attempt all questions in brief. Qx7=14 Ono Question Marks [CO a ‘What are the various asympiotic notations? 2 1 > | Why are parentheses needed to specify the order of operations in infix |2 2 expressions but not in postfix operations? € How the choice of pivot element effecis the running time of quick sort | 2 3 algorithm? @__| What are the 2 different forms of hashing? 2 3 e ‘What is the significance of binary tree in Huffman algorithm? 2 4 £ ‘What is the number of edges in a regular graph of degree d and n vertices._|2 3 & __| Write an algorithm to obtain the connected components ofa graph 2 3 SECTION B 2. Altempt any hree of the following: 7x3=21 a | Write a Pseudo code that will concatenate tWo linked lists. Function should | 7 1 have two parameters, pointers to the-beginning of the lists and the funetion should link second list at the end of the first list b | Write an algorithm to convert a. valid arithmetic infix expression into @n,}7 2 equivalent postfix expression) Trace your algorithm for following infix expression. A+B'C-DIF | What are the disadvantages of linear probing in hashing? Discuss how |7 3 quadratic probing can be used to solve some of these problems Write C function for non-recursive post order traversal. 7 a | Consider the following graph and using Dijkstra Algorithm find the shortest |7 3 path. SECTION C 3. Attempt any one part of the following: 7x1=7 a | Each element of an array Data [20][50] requires 4 bytes of storage. Base [7 T address of Data is 2000. Determine the location of Data {10][10] when the array is stored as (i) Row major (ii) Column major 1[Page Printed Page: 2 of 2 AOU OU 0 A TA Subject Code: BCS301 PAPER 1D-311405 Roll Noz BIECH (SEM III) THEORY EXAMINATION 2023-24 DATA STRUCTURE TIME: 3HRS M.MARKS: 70 b. | How will you create link list representation of a polynomial, Explain it with ] 7 1 the suitable example. 4. Attempt any one part of the following: 7x1=7 @ | Writean algorithm to evaluate an arithmetic expression using stack andshow [7 [2 how the expression 3#(5-3) will be evaluate b.__ | Adouble ended Queue (deque) is a linear list in which additions may bemade [7 [2 at either end. Obtain a data representation mapping a deque into one dimensional array. Write C function to add and delete elements from either end of deque 5. Attempt any one part of the following: Tx a | Write a C program for sorting 100 integer numbers wring selection sort]7 [3 procedure, Discuss the worst-case time complexity of the algorithms b. | Write a program in C language to implement binary search algorithm. Also[7 [3 discuss the average behavior of the algorithm, 6. Attempt any one part of the following: 7x a. IfE and I denotes the external and internal path Tength of a binary tree having | 7 4 n internal nodes then show that E=I+2n, b. | Suppose character a, b, ¢, d.e,f has probabilities 0.07, 0.09, 0.12, 0.22, 0.23. |” 1 |4 0.27 respectively. Find an optional Huffinan code and draw the Huffman tree What is the average code length? 7, Attempt any one part of the following: 7x a Find the minimum spanningree using Prim’s algorithm for the graph shown | 7 3 below: - _— 10 3 5 a . Se 8 2 b_ | Write a program in C a to-combpute the indegree and outdegree of [7 3 every vertex of a directed graph when the graph is represented by an adjacency matrix. 2[Page

You might also like