Data Structure
Data Structure
INTRODUCTION
Multiple Choice Type guestions
[WBUT 2009]
AnC language, malloc( ) returns b) structure pointer
a) integer pointer
c) null pointer d) void pointer
Answer: (c)
[WBUT 2010]
2.Which of the following is the best time for an algorithm? d)O(nlog, n)
a) O(n) b)O(log, n) )o(2)
Answer: (b)
same task. Which algo. should execute the slowest for large
3/Four algo.s do the (WBUT 2010]
values of n?
b) O(n) c) O(log, n) d) o(2")
a) o(n)
Answer: (d)
values of
the following algorithm should execute the slowest for large
(WBUT 2012]
4. Which of
/N? c) O(log,N) d) None of these
a) O (N) b) O(N')
Answer: (b)
algorithm)? [WBUT 2013]
Which is better computing time (in analysis of d) None of these
b) O(2n). c) O(log 2n)
a) o(n)
Answer: (c)
DSA-2
ARRAYS
Muitiple Choice Type Questions
addressof
1. Each element of an array bytes of storage. Base major is
arr is 2000. The location of arr20;50] when
requires 4
the array is stored
as column
WBUT2008]
a) 2320 arr10110] c) 4048
b) 2840 d) 4840
Answer: (b
WBUT 2011]
sclanguage, arrays are stored in which representation?
a) Column major b) Row major
c) Layer major d) none of these
Answer: (b)
3. For Column Major, what is the 2ddress of 13, th element of a 3x4 auu
(cOmains integer number)? it is aiven that the Base Address is 2000.d)[WBUT Z013|
c) 2016 2018
a) 2010 b) 2012
Answer: should be 2020.
DSA-9
POPIILAR PIRIAvin
POPULAR PUBLICATIONS
LINKED LIST
Type guestions
Multiple Choice of an
following function for insertion
[WBUT 2005]
inserted in the
statement to be
1. Choose the linked list:
into a doubly
elementstruct list next, * prev; }i
dlist struct prev )
int ral; struct list
dlist * x, element
( .struct of the new
void insert Contains the addresg
{ /* x next;
next = prev
prev;
prev = inserted here
statements to be next =x
/* next =x -’ next ’
b) prev -’ prey =x
next =X next =x -’ next ’
prev=x- next - d) prev ’
a) preV --’ prev FX
prev =x ’ next
c) preV
Answer: (d) Linked list requires
after a givennode in adoubly
pointer exchanges WBUT 2006]
node
2Anserting anew exchanges b) two exchanges
a) four pointer d) nopointer
exchanges
c) one pointer involves the
Answer: (a) insertion of a record [WBUT 2008]
organization,
circularly linked list d) 3 pointers
13Tn a c) 2 pointers
modificationof
b) 1 pointer
a) no pointer
Answer: (c) [WBUT 20121
d) Binary search
not suitable for c) AVL Tree
V4. Linked list are b) Deque
a) Stack
Answer: (d) [WBUT 2012]
d) al! of these
memory allocation use c). Free
15. Dynamic
a)Calloc
b)Malloc
Answer: (d) previous nde
pointer to the next as wellas [WBUT 2013]
Which type of linked Listcontains a
6. List
in the sequence? b) Circular Linked
ist d) Allof these
a) Singly Linked !List
c)Doubly Linked
Answer: (c) following
structure for which one of the
[WBUT 2014]
list is not suitable data
A. Linked
problems? b) radix sort
a) insertionsort d) polynomial addition
c) binary search
Answer: (c)
DSA-30
POPULAR PUBLICATIONS
RECURSION
guestions
Multiple Choice Type
[WBUT 2005]
.Which of the following statements is not true? be nearer in some sense to a
must
function calls itself, it
a) Each time a
memory
always fast and use less
solution
known as
b) Recursive functions are
function is a recursive callthen it is
statement of
c) When the last
taifrecursion. used.
implementing recursion, stacks are generally
d) In
Answer: (b)
of [WBUT 2009)
fib (n) = fib (n-1) is an example
+ fib (n-2)b)Binary Recursion
function
1 2Fibonacci
a)Linear Recursion d) Mutual Recursion
Recursion
c) Non- linear
Answer: (b)
non-negative values of m and nis recursively
for all
3. The Ackerman function,
defined as if m=0
n+1
A(m, n) =A(m-1,l) if m!=0 but n = 0
|A(m-1, A(m, n-1)) if m! =0 and n!=0
[WBUT 2007, 2010]
Therefore the value of A (1, 2) is
b) 3 c) 5 d) 2
a) 4
Answer: (a)
recursively. [WBUT 2011]
A. The list datastructure can be defined
a) True b) False
Answer: (a)
DSA-40
TREES
Multiple Choice Type guestions
2. Which of the following methods had the hest average case complexe
searching? [WBUT 2006]
a) Hashing b) Sequential c) Random d) binary
Answer: (a)
5. The Linear Probing Technique for collision resolution can lead to WBUT 2009]
a) Primary clustering b) Secondary clustering
c) Overflow d) Efficiency storage utilization
Answer: (a)
c) O(n)< 0(2")<0(n)
d) o(logn)0(logn)<0(n
*logn)
<0(")<o(2")
<0(n)<0(n* logn) <0(r
Answer: (d) )<o(2")
2. Asot, which
iteratively
any element less than it and passes through a list to exchange the first element with
then repeats with a new first
a) bubble sort element, I5 WBUT
ai
c) heap sort b) quick sort 2005]
Answer: (d) d) selection sort
4. Which of the following sortingtechniques requires extra space, than the data to
be stored? [WBUT 2006]
a) Selection sort b) Bubble sort c) Heap sort d) None of these
Answer: (c)
DSA-116