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

DS 2022

Uploaded by

Spidy Xd
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)
20 views2 pages

DS 2022

Uploaded by

Spidy Xd
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/ 2
Printed Page: 1 of 2 AVVO U1 Subjet Coder KCSSOL PAPER ID-411677 Roll Ne BTECH (SEM II) 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. SECTION A 1. Attempt all questions in brief. 2x10=20 ‘QNo ‘Questions CO (a) | Convert the infix expression (AFB) *(C-D) SE*P to postfix, Give the answer | I without eny spaces ()_| Rank the following ypical bounds ta increasing order of growth rate z O(log m), O(n), 00), O(log m) (©) Draw the binary search tree that results from inserting the following numbers im | 3 sequence starting with 11 11,47, 81,9.61, 10, 12, (| What docs the following recursive function do for a given Linked List wits Inst 4 node as head? void fun (struct node* head) { if{head = NULL) funl(bead-next); printi("%ed", head=>data); , T)_| Define = sparse matrix Suggest a space efficient epresentalion Tor space matices, | 5 (_| List the advantages of doubly Tinked Tis over single Tinked Ti T (@)__| Give example of one cach sable and unstable sorting techniques 2 (H)_| Write advantages oFAVI ree over Binary Search Tree (BST) 3 @_| Whats til recursion? Explain witha suitable example 4 @_ | Write different representations of graphs inthe memory 3 SECTION B 2. Attempt any three ofthe following: 10X3=30 QNo ‘Questions co (@) | Write advantages and disadvantages of faked list over arrays. Write a © function | 1 creating new linear linked list by selecting altemate elements of a linear linked lis. (| Write algorithms of insertion sort. Implement che same on the following numbers; | 2 also calculate its time complexity. 13, 16, 10, 11,4, 12, 6,7 ()___| Differentiate between DFS and BFS. Draw the breadth First Tree for 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 Uireads in Binary Search Tree? Write an | 5 algorithm to insert ¢ node in thread binary tree, SECTION 3. Attempt any one part ofthe follows 10x: ‘QNo Questions Ta) Suppose a three dimensional array A is declared using A[10, 35, 103) T () 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, Printed Page: of AVVO U1 Subjet Coder KCSSOL PAPER ID-411677 Roll Ne BTECH (SEM II) THEORY EXAMINATION 2021-22 DATA STRUCTURE. (©) _] Discuss the representation of polynomial of single variable using inked ist Wate | T 'C’ functions to add two such polynomials represented by linked lis. 4, _Kifempt any one part ofthe followin; x= 10 ‘QNo ‘Questions co ()__| @) Use the merge sor algorithm to sor the Tollowing elements im ascending onder. [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 algorithrs? Justify T)_ | The keys 12, 17,13, 2,5, 43, 5 and 15 are inserted ino an initially empty hash | 2 table of length 15 using open addressing with bash function hk) = k mod 10 and linear probing. What i the resultant hash table? (Gi) Differentiae between linear and quadratic probing te 5. __Aitempt any one part of the following: 10K ‘QNo ‘Questions (@)___| Use Dijksta’s algorithm to find the shortest paths fom source t all other vertices in | 3 the following graph, (©)_ | Apply Prim’s algorithm to find @ minimum spanning tree in the folowing weighted | 3 graph as shown below. 6. _Kifempt any one part of the following: TOX1=10 QNo ‘Questions co (| @ Waite an ierative function to search a key in Binary Search Tree (BST). 4 ji) Discuss disadvantages of recursion with some suitable example © _| @) What is Recursion? 7 Gi)Write a C program to calculate factorial of number using recursive and non- scusive functions, 7. Aifempt any one part of the folowing: T0X1 = 10 ‘QNo Questions co (| @ Why does time complexity of search operation in B-Tvee is better than Binary | > Search Tree (BST)? Gi Insert the following keys into an initially empty B-tree of order S 2,8, fb, k, doh, m3, 8,8, 161X610, 0,p Gi) What will be the retultant B-Tree after deleting keys j,tand d in sequence? (|G) Design a method for keeping two slacks within a single Tinear array so tat | 5 neither stack overflow until all the memory i used, Gi) Write a C program to reverse a string using stack.

You might also like