GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER- III (New) EXAMINATION — WINTER 2019
--- Content provided by FirstRanker.com ---
Subject Code: 2130702 Date: 28/11/2019Subject Name: Data Structure
Time: 02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
--- Content provided by FirstRanker.com ---
2. Make suitable assumptions wherever necessary.3. Figures to the right indicate full marks.
Q.1 (a) Define primitive and non-primitive data types with example. 03
(b) Differentiate linear and non-linear data structures. 04
(c) Write algorithms for PUSH and POP stack operations. 07
--- Content provided by FirstRanker.com ---
Q.2 (a) Enlist applications of stack and queue. 03
(b) Evaluate the following postfix expression using stack. Show each step. 04
5 3 + 6 2 / * 3 5 * +
(c) Write a C functions for insertion and deletion operation in simple queue. 07
OR
--- Content provided by FirstRanker.com ---
(c) Write an algorithm to delete an element from circular queue. Show the 07
steps of insertion and deletion operation in sample circular queue.
Q.3 (a) Describe the advantages of linked list over array. 03
(b) Write an algorithm to insert a node at last position in doubly linked list. 04
(c) Write an algorithm to print the singly linked list in reverse order using 07
--- Content provided by FirstRanker.com ---
stack.OR
Q.3 (a) Describe following terms with respect to binary tree: 03
(1) depth of tree (2) balanced tree (3) complete tree
(b) Construct the binary tree for the following tree traversals. 04
--- Content provided by FirstRanker.com ---
Inorder: B F G H P R S T W Y ZPreorder: P F B H G S R Y T W Z
(c) Write an algorithm to insert a node into binary search tree. 07
Q.4 (a) Prove that a binary tree with 20 nodes have 21 null branches. 03
(b) Write a recursive-algorithm for preorder traversal of binary tree. 04
--- Content provided by FirstRanker.com ---
(c) Describe Prim’s minimum spanning tree algorithm with example. 07OR
Q.4 (a) Show the resultant BST after applying following operations in sequence 03
on given tree. Delete 8 b) Insert 9 c) Delete 7
(b) Enlist and describe different ways for representing graph data structure 04
--- Content provided by FirstRanker.com ---
with example.(c) Show the steps of BFS and DFS traversal for following graph starting 07
from vertex 2. Consider adjacency list is sorted in ascending order.
--- Content provided by FirstRanker.com ---
Q.5 (a) Write an algorithm for linear searching. 03
(b) Describe indexing structure for index file. 04
(c) Write an algorithm for merge sort. Show the steps of its working with 07
sample data.
--- Content provided by FirstRanker.com ---
OR
Q.5 (a) Define hash function. Describe any two hash methods with example. 03
(b) Write an algorithm for binary searching. 04
(c) Apply bubble sort on following data and show all steps. 07
123, 34, 65, 105, 27, 79, 12, 10, 125, 156
--- Content provided by FirstRanker.com ---
This download link is referred from the post: GTU BE/B.Tech 2019 Winter Question Papers || Gujarat Technological University
--- Content provided by FirstRanker.com ---