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

Question-Regular-Cs205 Data Structures (CS, It), December 2017

This document appears to be an exam for a data structures course, consisting of multiple choice and written answer questions. It covers topics like abstract vs concrete data structures, Big O notation, linked lists, trees, graphs, sorting algorithms, hashing, and more. The exam is divided into parts A through E testing knowledge of these essential data structures and algorithms concepts.

Uploaded by

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

Question-Regular-Cs205 Data Structures (CS, It), December 2017

This document appears to be an exam for a data structures course, consisting of multiple choice and written answer questions. It covers topics like abstract vs concrete data structures, Big O notation, linked lists, trees, graphs, sorting algorithms, hashing, and more. The exam is divided into parts A through E testing knowledge of these essential data structures and algorithms concepts.

Uploaded by

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

D D7144

Total Pages: 2
Reg No.:_______________ Name:__________________________

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY


THIRD SEMESTER B.TECH DEGREE EXAMINATION, DECEMBER 2017
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 Differentiate between abstract and concrete data structure. (3)
2 N2+ N = O (N3) Justify your answer. (3)
3 What is frequency count? Explain with an example. (3)
4 How can we represent a linked list in memory using arrays? (3)

PART B
Answer any two full questions, each carries 9 marks.
5 Describe Big O notation used to represent asymptotic running time of algorithms. (9)
Give the asymptotic analysis of any one iterative algorithm.
6 a) Consider a singly linked list having n nodes. The data items d1, d2, …., dn are (5)
stored in the n nodes. Let X be a pointer to the jth node (1 ≤ j ≤ n) in which dj is
stored. A new data item d stored in a node with address Y is to be inserted in the
list. Give an algorithm to insert d into the list after dj to obtain a list having items
d1, d2, ……, dj, d, dj+1, …..dn in that order without using the header.

b) Explain about the use and representation of header node in linked list (4)
7 a) What are the application of vectors. (3)
b) Write an algorithm for deleting a node from a specified position in a circular (6)
queue
PART C
Answer all questions, each carries 3 marks.
8 How will you check the validity of an arithmetic expression using stack (3)
9 Let take initial memory as - (3)

0 150 200 300 410 500K


Do the following things with first fit approach and show the memory status:
1. Allocate process C of size 90K
2. Allocate process D of size 70K
10 Write a program in C to concatenate two strings using string function. (3)
11 If a full binary tree is of height 5, give the positions of left child and right child (3)
of the second node in level 2.

PART D
Answer any two full questions, each carries 9 marks.
12 Convert the following expression into its corresponding post fix form using the (9)
prescribed algorithm:
(300+23)*(43-21)/(84+7). Do the evaluation of resultant postfix expression.

Page 1 of 2
D D7144

13 a) Here is a small binary tree: (4.5)

14
/ \
2 11
/\ /\
1 3 10 30
/ /
7 40
What is the output obtained after preorder, inorder and postorder traversal of the
following tree.
b) Write the non-recursive algorithm for post order traversal of tree. (4.5)
14 a) Write a function( C/ pseudo code ) to insert an element into BST. (4)
b) Write a program in C to check a particular sub string is present in a given string (5)
or not? If found print its location.
PART E
Answer any four full questions, each carries 10 marks.
15 a) Draw the directed graph that corresponds to this adjacency matrix: (5)
0 1 2 3
0 | true false true false |
1 | true false falsefalse |
2 | false falsefalse true |
3 | true false true false |
b) Give the algorithm for BFS graph traversal. (5)
16 a) Show all the passes using insertion sort for the following list (5)
54,26,93,17,77,31,44,55,20
b) Write a function (C/ pseudo code) of heap sort using min heap. (5)
17 Write a program to do the partition of a list using quick sort and then use (10)
insertion sort for sorting sub lists. Explain it with example.
18 a) Write a program of binary search which tells how many comparisons it did to (7)
search an element given as user input.
b) Do the performance comparisons of Linear search and Binary search. (3)
19 Consider a hash table of size 7 and hash function h(k)= k mod 7. Draw the table
that results after inserting in the given order, the following values.
19,26,13,48.17 for each of the three scenarios.
a) When collisions are handled by separate chaining. (3)
b) When collisions are handled by linear probing. (3)
c) When collisions are handled by double hashing using second hash function h’=5- (4)
(5 mod k).
20 a) Get the hash index in table of size 7 for the following list. 56,43,27,32,3. (3)
b) Do the rehashing when the inserted elements are more than 4. (3)
c) Briefly explain any 2 hasting functions. (4)
****

Page 2 of 2

You might also like