DSPM (3rd) Dec2015
DSPM (3rd) Dec2015
of Pages : 02
Total No. of Questions : 09
B.Tech.(CSE/IT) (Sem.–3)
DATA STRUCTURES & PROGRAMMING METHODOLOGY
Subject Code : CS-207
Paper ID : [A0454]
Time : 3 Hrs. Max. Marks : 60
INSTRUCTIONS TO CANDIDATES :
1. SECTION-A is COMPULSORY consisting of TEN questions carrying T WO marks
m
each.
2. SECTION-B contains FIVE questions carrying FIVE marks each and students
have to attempt any FOUR questions.
o
.r c
3. SECTION-C contains T HREE questions carrying T EN marks each and students
have to attempt any T WO questions.
pe SECTION-A
m
1. Write briefly :
a o
p
a. What is the difference between data, data type, and data structure?
r .r c
b e
b. How can we calculate the address of any element of a linear array?
p
c. Discuss two advantages of linked lists over array data structure.
a
rp
d. What are FIFO and LIFO? Give an example of each.
b
e. How are strings stored in memory?
f. What do you mean by depth of recursion? Give one example of recursive function.
j. Give one example where implementation of set data structure will be useful.
1 | M-56504 (S2)-592
SECTION-B
2. Explain different kinds of graph. How are trees and graphs traversed?
3. How a 2D array is stored? Write an algorithm to sort one dimensional array. Also
comment on the complexity of the algorithm.
4. How are stacks and queues implemented as a linked list? Write an algorithm to reverse a
string using stacks.
5. What are the different ways in which files are stored in memory? In which scenario do
we prefer to do I/O of C program from a file? Write the various file handling functions
in C.
6.
m
What is the hashing? Discuss the advantage of hashing and the various kinds of hash
function.
o
.r c
SECTION-C
7.
e
How are linked lists stored in memory? Write an algorithm to :
p m
a
a) Insert a new node in a sorted two way list
o
p
b) Print reverse of a linked list.
r .r c
b e
8. Give two practical applications of Sets. Write algorithm for the various set operations and
illustrate with suitable example.
9.
p
What do you mean by non-linear data structure? Under what conditions we prefer
a
non-linear data structure over linear data structures? Explain the memory implementation
rp
of any one non-linear data structure.
2 | M-56504 (S2)-592