MORE IN Data Structures and Applications
VTU Computer Science (Semester 3)
Data Structures and Applications
June 2015
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary

1 (a) What is an algorithm? Briefly explain the criteria that an algorithm must satisfy.
6 M
1 (b) Write an recursive function to sum a list of numbers and also show the total step counts for the function.
7 M
1 (c) Define three asymptotic notations and give the asymptotic representation of function 10n+5 in all the three notations.
7 M

2 (a) What is a structure? Give three different ways of defining structure with example to each.
7 M
2 (b) What is the degree of the polynomial? Consider the two polynomials A(x)-x1000+1 and B(x)=10x3+3x2+1. Show diagrammatically how these two polynomials can be represented in an array.
5 M
2 (c) For the given sparse matrix and its transpose, give the triplet using one dimensional array, A is the given sparse matrix, B will be its transpose. $A = \begin{bmatrix} 15 &0 &0 &22 &0 &-15 \\0 &11 &3 &0 &0 &0 \\0 &0 &0 &-6 &0 &0 \\0 &0 &0 &0 &0 &0 \\ -91 &0 &0 &0 &0 &0 \\0 &0 &28 &0 &0 &0 \end{bmatrix}$
8 M

3 (a) Convert the following infix expression into postfix expression using stack: $i) \ a* (b+c)*b \\ ii) \ \dfrac {(a+b)* d+e}{(f+a*d)+c}$
8 M
3 (b) Write a C function to evaluate a postfix expression and apply the same to evaluate AB+CDE -*/, A=5, B=6, C=4, D=3, E=7.
12 M

4 (a) Write a C function to insert a node at front and rear end in a circular linked list.
10 M
4 (b) (i) Write a C function to reverse the given singly linked list.
5 M
4 (b) (ii) Write a C function to concatenate two singly linked list.
5 M

5 (a) What is a binary tree? Show the array representation and linked representation for the following binary tree. 5 M
5 (b) Write an expression tree for the expression A/B*C*D+E. Give the C function for inorder, preorder, postorder traversals and apply the traversal methods to the expression tree and give the result of traversals.
10 M
5 (c) What is a max heap? Construct the max heap for 7, 8, 3, 6, 9, 4, 10, 5.
5 M

6 (a) What is a binary search tree? Draw the binary tree for input:
14, 15, 4, 9, 7, 18, 3, 5, 16, 4, 20, 17, 9.
Give recursive search function to search an element in that tree.
10 M
6 (b) Construct the binary tree from the given traversals:
Preorder: A B D G C E H I F
Inorder: D G B A H E I C F
5 M
6 (c) What is a winner tree? Explain with suitable example a winner tree for k=8.
5 M

7 (a) What is Fibonacci Heap? Give example. Give the steps for election of node and decrease key of specified node in F-heap.
10 M
7 (b) Write short note on: i) Binontial heaps
ii) Leftist trees.
10 M

8 (a) Starting with an empty AVL tree perform following sequence of insertion, MARCH, MAX, NOVEMBER, AUGUST, APRIL, JANUARY, DECEMBER, JULY. Draw the AVL tree following each insertion and state rotation type if any for insertion operation.
10 M
8 (b) Explain the red-black tree with example.
6 M
8 (c) Let h be the height of a red-black tree, let n be the number of internal nodes in the tree and r be the rank of the root then, prove that
i) h ≤ 2r
ii) n ≥ 2r-1.
4 M

More question papers from Data Structures and Applications
{"ft_lang_label":"__label__en","ft_lang_prob":0.7650426,"math_prob":0.9653688,"size":3339,"snap":"2021-43-2021-49","text_gpt3_token_len":1056,"char_repetition_ratio":0.12623689,"word_repetition_ratio":0.14736842,"special_character_ratio":0.33333334,"punctuation_ratio":0.122292995,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99471647,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-27T16:04:04Z\",\"WARC-Record-ID\":\"<urn:uuid:3c0165bb-ba58-4413-b583-7c073c6dc135>\",\"Content-Length\":\"60068\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:30ba55a4-7d11-48e6-ba26-bdc65aeee108>\",\"WARC-Concurrent-To\":\"<urn:uuid:04046102-2209-48ca-85e0-85706f07d60d>\",\"WARC-IP-Address\":\"104.21.3.201\",\"WARC-Target-URI\":\"https://stupidsid.com/previous-question-papers/download/data-structures-and-applications-11186\",\"WARC-Payload-Digest\":\"sha1:2EHOY5YLVYQUA4NT4OPTFLPTWL6NLJWY\",\"WARC-Block-Digest\":\"sha1:WXF6TMSD2IVH57VMDVPYTF4IIAIV2AFZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323588216.48_warc_CC-MAIN-20211027150823-20211027180823-00202.warc.gz\"}"}