# Andhra University Model Papers BTech cse 3rd sem Data Structures

MODEL PAPER

B.Tech (CSE) Degree Examination

3rd sem

Data Structures

Effective from the admitted batch of 2004-2005

Time: 3 hrs
Max Marks: 70

First Question is Compulsory

Answer any four from the remaining questions

All Questions carry equal marks

Answer all parts of any question at one place

1. Briefly answer the following questions: (7*2=14)
a. Define Abstract Data Type ? How are they used in program development.
b. Write the primitive operations of ADT queue.
c Write the prefix and postfix equivalents to the infix expression A/B+C-D *(E+F).
d. Write the best, worst and average case time complexity estimates of Quick Sort algorithm.
e. What is an Almost Complete Binary Tree? Write an application that makes use of it.
f. Write the applications of depth first traversal of a graph.
g. When does interpolation search performs better than binary search?

2. a. Assume that each element of an array ‘A’ stored in row-major order occupies four bytes of memory. If ‘A’ is declared as: int a . And the address of the first element of ‘A’ is 2000, find the address of the array element A. (6)

b. Write a C program to evaluate a given postfix expression using stack and explain it with an example. (8)

3. a. Write a recursive function in C to find the nth Fibonacci number (5)

b. Write a non – recursive function for the above problem. (5)

c. Compare the efficiencies of the above two functions. (4)

4. a. Compare and contrast the ADTs Queue and Priority Queue. (6)

b. Write a C function to concatenate two singly linked circular list without traversing either of them and explain it. (8)

5. a. Discuss different ways of representing a binary tree and suggest an application for each of the representations. (8)

b. Explain how the threads are used to simplify the traversal of a binary tree. (6)

6. a. Construct a binary search tree to accommodate the given list of integers. (5)
47, 56, 23, 17, 64, 36, 29, 22

b. Find the in order, preorder and post order sequence of nodes of the above tree. (6)

c. Explain the process of deletion of node ’23’ from the above tree and draw the resultant tree. (4)

7. Write a C function to arrange the elements of an array in ascending order using Radix soil algorithm and explain it with a suitable example. (14)

8. a. Discuss the Dijkstra’s algorithm for finding the shortest paths from a source to all other vertices in a directed graph. What is its time complexity. (7)

b. Apply Kruskal’s algorithm to find the minimal spanning tree for a weighted undirected graph whose adjacency/weight matrix is given below.
i) Draw the graph. (3)
ii) Show different stages of development of the above spanning tree. (8)
iii) Find the cost of the minimal spanning tree. (3)

```0  6  1  5  ∞  ∞
6  0  5  ∞  3  ∞
1  5  0  5   6  4
5  ∞  5  0  ∞  2
∞  8  6  ∞  0  6
∞  ∞ 4  2  6  0```
{"ft_lang_label":"__label__en","ft_lang_prob":0.8074307,"math_prob":0.90966123,"size":2790,"snap":"2021-21-2021-25","text_gpt3_token_len":735,"char_repetition_ratio":0.113065325,"word_repetition_ratio":0.007874016,"special_character_ratio":0.27526882,"punctuation_ratio":0.12224109,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99202806,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-05-16T00:45:35Z\",\"WARC-Record-ID\":\"<urn:uuid:82d18173-914d-4f4d-8cb2-a5270b775b4a>\",\"Content-Length\":\"87409\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9607f618-f226-4bc8-b69c-aa225da52aa6>\",\"WARC-Concurrent-To\":\"<urn:uuid:bd0aa6bc-2db9-424c-9bf7-ca0a707823ad>\",\"WARC-IP-Address\":\"54.186.64.191\",\"WARC-Target-URI\":\"https://www.kopykitab.com/blog/andhra-university-model-papers-btech-cse-3rd-sem-data-structures/\",\"WARC-Payload-Digest\":\"sha1:H4P52Q7ZDTLYLEFIF6RM4UKTT3VLHALO\",\"WARC-Block-Digest\":\"sha1:K3BN6E6IH73B43OQOEKI6YUMYTADWXI4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-21/CC-MAIN-2021-21_segments_1620243991488.53_warc_CC-MAIN-20210515223209-20210516013209-00143.warc.gz\"}"}