CA-II DS Question Bank
CA-II DS Question Bank
1. A linear list of elements in which deletion can be done from one end
(front) and insertion can take place only at the other end (rear) is known
as _____________
a) Queue
b) Stack
c) Tree
d) Linked list
2. A queue follows __________
a) FIFO (First In First Out) principle
b) LIFO (Last In First Out) principle
c) Ordered array
d) Linear tree
3. Circular Queue is also known as ________
a) Ring Buffer
b) Square Buffer
c) Rectangle Buffer
d) Curve Buffer
4. If the elements “A”, “B”, “C” and “D” are placed in a queue and are
deleted one at a time, in what order will they be removed?
a) ABCD
b) DCBA
c) DCAB
d) ABDC
5. A data structure in which elements can be inserted or deleted at/from
both ends but not in the middle is?
a) Queue
b) Circular queue
c) Dequeue
d) Priority queue
6. A normal queue, if implemented using an array of size MAX_SIZE, gets
full when?
a) Rear = MAX_SIZE – 1
b) Front = (rear + 1)mod MAX_SIZE
c) Front = rear + 1
d) Rear = front
7. Which of the following is not the type of queue?
a) Ordinary queue
b) Single ended queue
c) Circular queue
d) Priority queue
8. A linear collection of data elements where the linear node is given by
means of pointer is called?
a) Linked list
b) Node list
c) Primitive list
d) Unordered list
9. In linked list each node contains a minimum of two fields. One field is
data field to store the data second field is?
a) Pointer to character
b) Pointer to integer
c) Pointer to node
d) Node
10. Linked lists are not suitable for the implementation of ___________
a) Insertion sort
b) Radix sort
c) Polynomial manipulation
d) Binary search
11. Linked list is considered as an example of ___________ type of memory
allocation.
a) Dynamic
b) Static
c) Compile time
d) Heap
12. In Linked List implementation, a node carries information regarding
___________
a) Data
b) Link
c) Data and Link
d) Node
13. Linked list data structure offers considerable saving in _____________
a) Computational Time
b) Space Utilization
c) Space Utilization and Computational Time
d) Speed Utilization
14. With what data structure can a priority queue be implemented?
a) Array
b) List
c) Heap
d) Tree
15. What would be the output after performing the following operations in a
Deque?
1.Insertfront(10);
2.Insertfront(20);
3.Insertrear(30);
4.Insertrear(40);
5.Deletefront();
6.Insertfront(50);
7.Deleterear();
8.Display();
a. 10, 20, 30
b. 50, 10, 30
c. 40, 20, 30
d. None of the above
16. Which of the following statement is not true regarding the priority queue?
18. Choose correct output for the following sequence of operations (★ signifies
top).
(a) 85251
(b) 85521
(c) 2551
(d) 521
a) 2, 7, 2, 6, 5, 11, 5, 9, 4
b) 2, 7, 5, 2, 6, 9, 5, 11, 4
c) 2, 5, 11, 6, 7, 4, 9, 5, 2
d) 2, 7, 5, 6, 11, 2, 5, 4, 9
23. For a binary tree the first node visited in in-order and post-order traversal
is same.
a) True
b) False
24. For the tree below, write the in-order traversal.
a) 6, 2, 5, 7, 11, 2, 5, 9, 4
b) 6, 5, 2, 11, 7, 4, 9, 5, 2
c) 2, 7, 2, 6, 5, 11, 5, 9, 4
d) 2, 7, 6, 5, 11, 2, 9, 5, 4