0% found this document useful (0 votes)
106 views6 pages

CA-II DS Question Bank

This document contains a 25 question quiz on data structures topics like queues, stacks, linked lists, trees, and their implementations. The questions cover concepts like FIFO, LIFO principles; types of queues like normal, circular; operations on linked lists, stacks and trees; and time complexities of different queue implementations.

Uploaded by

Rohan Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views6 pages

CA-II DS Question Bank

This document contains a 25 question quiz on data structures topics like queues, stacks, linked lists, trees, and their implementations. The questions cover concepts like FIFO, LIFO principles; types of queues like normal, circular; operations on linked lists, stacks and trees; and time complexities of different queue implementations.

Uploaded by

Rohan Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

KARMAYOGI ENGINEERING COLLEGE, SHELVE

Computer Science and Engineering Department

CA-II Question Bank

Class: SY CSE(Sem-I) Subject: DS

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?

a. Processes with different priority can be easily handled


b. Easy to implement
c. Deletion is easier
d. None of the above

17. Which of the following applications may use a stack?

(a) A parentheses balancing program

(b) Tracking of local variables at run time

(c) Compiler Syntax Analyzer

(d) All of the above

18. Choose correct output for the following sequence of operations (★ signifies
top).

push(5), push(8), pop, push(2), push(5), pop, push(1)

(a) 85251

(b) 85521

(c) 2551

(d) 521

19. How many children does a binary tree have?


a) 2
b) any number of children
c) 0 or 1 or 2
d) 0 or 1
20. For the tree below, write the pre-order traversal.

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

21. To obtain a prefix expression, which of the tree traversals is used?


a) Level-order traversal
b) Pre-order traversal
c) Post-order traversal
d) In-order traversal

22. Using what formula can a parent node be located in an array?


a) (i+1)/2
b) (i-1)/2
c) i/2
d) 2i/2

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

25. In linked list implementation of queue, if only front pointer is


maintained, which of the following operation take worst case linear time?
a) Insertion
b) Deletion
c) To empty a queue
d) Both Insertion and To empty a queue

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy