DS Unit 1 Question Bank
DS Unit 1 Question Bank
Naini, Prayagraj
B. Tech. 3rd Semester
1) Write at least three difference between malloc() and calloc() functions. Why do we use dynamic
2) Consider a multi-dimensional Array A[90][30][40] with base address starts at 1000. Calculate the
address of A[10][20][30] in row major order and column major order. Assume the first element is stored
3) Consider the two dimensional lower triangular matrix (LTM) of order N, Obtain the formula for address
calculation I address of row major and column major order for location LTM[j][k], if base address is BA
10) Given two arrays of integers in ascending order, develop an algorithm to merge these arrays to form a
11) What is doubly linked list? What are its applications? Explain how an elements can be deleted from
a. Time Complexity
b. Space Complexity
d. Big O Notation
14) Write a program to delete a specific element in Single linked list. Double linked list takes more space
than single linked list for storing one extra address. Under what condition, could a double linked list
15) Suppose multi dimensional arrays P and Q are declared as P(-2:2,2:22) and Q(1:8, -5:5, -10:5) stored
c. Assume Base address (Q) =400, W=4, Find the effective indices E1, E2, E3 and address of the
element Q[3,3,3].
16) Define the term Data Structure. List some linear and non-linear data structures stating the application
17) Write an algorithm to insert a node at the end in a Circular linked list. [2017] [2008]
18) what do you mean by circular linked list write functions to perform following operations:[2013][2008]
20) Write at least three difference between malloc() and calloc() functions. Why do we use dynamic
21) What are the parameters to judge the efficiency of an algorithm. [2012]
22) Write the merits and demerits of static and dynamic memory allocation technique [2012]