0% found this document useful (0 votes)
202 views

Answer All Questions, Each Carries 3 Marks: Reg No.: - Name

This document contains questions from a Data Structures exam for third semester B.Tech students. It covers topics like linked lists, trees, sorting, searching, and hashing. Students are asked to write algorithms for operations on different data structures like traversal, insertion, deletion etc. They are also asked questions to evaluate expressions in postfix notation, define properties of data structures and determine time complexity of algorithms.

Uploaded by

Mooo Point
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
202 views

Answer All Questions, Each Carries 3 Marks: Reg No.: - Name

This document contains questions from a Data Structures exam for third semester B.Tech students. It covers topics like linked lists, trees, sorting, searching, and hashing. Students are asked to write algorithms for operations on different data structures like traversal, insertion, deletion etc. They are also asked questions to evaluate expressions in postfix notation, define properties of data structures and determine time complexity of algorithms.

Uploaded by

Mooo Point
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

D D3826 Pages: 2

Reg No.:_______________ Name:__________________________

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY


THIRD SEMESTER B.TECH DEGREE EXAMINATION, APRIL 2018
Course Code: CS205
Course Name: DATA STRUCTURES (CS, IT)
Max. Marks: 100 Duration: 3 Hours
PART A
Answer all questions, each carries 3 marks Marks

1 Write an algorithm to perform backward traversal of a doubly linked list. (3)


2 Define the following terms, with examples: (3)
i) Header linked list ii) Circular linked list
3 What is the purpose of calculating frequency count? Compute the frequency count (3)
of the following code fragment.
for(i=0;i<n;i++)
for(j=0;j<n;j++)
printf(“%d”,a[i][j]);
4 What is stepwise refinement technique? (3)
PART B
Answer any two full questions, each carries 9 marks
5 a) What is the difference between recursive and iterative algorithms? (4.5)
b) Write recursive and iterative algorithm to traverse a singly linked list. (4.5)
6 a) Write an algorithm to add two polynomials. (6)
b) Write about top down and bottom up programming methodologies. (3)
7 a) Write an algorithm to insert a node after a given node in a doubly linked list. (4.5)
b) What is asymptotic notation? Describe about Big O notation. (4.5)
PART C
Answer all questions, each carries 3 marks
8 Write an algorithm to perform substring searching. (3)
9 Evaluate the following expressions written in reverse polish notation. Assume (3)
single digit operands and ^ represents exponentiation operator
i) 123*+42/^ ii) 63/45-*
10 Define the properties of circular queue. How will you check whether the circular (3)
queue is
i) Full ii) Empty
11 Write a recursive algorithm to perform preorder traversal. (3)
PART D
Answer any two full questions, each carries 9 marks
12 a) Write an algorithm to convert an infix expression to postfix. (4.5)
b) Show the structure of the binary search tree after adding each of the following (4.5)
values in that order: 10, 1, 3, 5, 15, 12, 16. What is the height of the created

Page 1 of 2
D D3826 Pages: 2

binary search tree?


13 a) Given five memory partitions of 100Kb, 500Kb, 200Kb, 300Kb, 600Kb (in order), (4.5)
how would the first-fit and best-fit algorithms place processes of 212 Kb, 417 Kb,
112 Kb, and 426 Kb (in order)? Which algorithm makes the most efficient use of
memory?
b) Develop an algorithm to add an element into a binary search tree. (4.5)
14 a) Write a C Program/algorithm to implement two stacks using a single array. (7)
b) What are the applications of trees? (2)
PART E
Answer any four full questions, each carries 10 marks
15 Write an algorithm/ C program to perform merge sort. Given the following list of (10)
numbers: [21, 1, 26, 45, 29, 28, 2] find the output obtained after each recursive call
of merge sort algorithm.
16 Write C program/algorithm to perform linear search. Find the time complexity for (10)
best, worst and average casefor a linear search in an array of n elements.
17 a) Write algorithm to perform Breadth First Search.Write one possible order of (5)
visiting the nodes of the following graph starting at vertex A.

b) What is hash table? What are the properties of hash function? (5)
18 What is max heap?Write an algorithm to perform heap sort. Give example. (10)
19 Write C program/algorithm to perform selection sort. Perform selection sort on an (10)
array [5,3,1,7,9].
20 What is double hashing? Suppose size of the hash table is 11. Open addressing (10)
and double hashing is used to resolve collisions.The hash function used is H(k) = k
mod 11.The second hash function is H2(k) = 5 - (k mod 5)
What values will be in the hash table after the following sequence of insertions?
16, 23 9, 34, 12, 56
****

Page 2 of 2

You might also like