Gujarat Technological University
Gujarat Technological University
___________
Marks
Q.1 (a) Compare array and linked list. 03
(b) Compare primitive and non primitive data types. datastructures 04
(c) Write an algorithm to perform insert and delete operations on simple queue. 07
Q.2 (a) Search the number 50 from the given data using binary search technique. 03
Illustrate the searching process.
10, 14, 20, 39, 41, 45, 49, 50, 60
(b) Apply merge sort algorithm to the following elements. 20, 10, 5, 15, 25, 30, 04
50, 35
(c) Write a ‘C’ program for bubble sort. 07
Q.5 (a) Define: 1. Acyclic graph 2. Leaf node 3. Complete binary tree 03
(b) For following expressions, construct the corresponding binary tree. 04
1. A+B/C*D-E
2. ((A+B)-(C*D))%((E^F)/(G-H))
(c) How are graphs represented inside a computer’s memory? Which method 07
do you prefer and why?
1
Q.8 (a) Give a brief note on indexing. 03
(b) Build a chained hash table of 10 memory locations. Insert the keys 131, 3, 04
4, 21, 61, 24, 7, 97, 8, 9 in hash table using chaining. Use h(k) = k mod m.
(m=10)
(c) Consider the hash table of size 10. Using quadratic probing, insert the keys 07
72, 27, 36, 24, 63, 81, and 101 into hash table. Take c1=1 and c2=3.
**********************