DS MCQ
DS MCQ
Which if the following is/are the levels of deletion of item form the stack, when stack
implementation of data structure is not empty is called _____ operation.
A) Abstract level A) push, pop
B) Application level B) pop, push
C) Implementation level C) insert, delete
D) All of the above D) delete, insert
2. A binary search tree whose left subtree and
right subtree differ in height by at most 1 9. ______is a pile in which items are added at
unit is called one end and removed from the other.
A) AVL tree A) Stack
B) Red-black tree B) Queue
C) Lemma tree C) List
D) None of the above D) None of the above
3. _________level is where the model 10. ______ is very useful in situation when
becomes compatible executable code data have to stored and then retrieved in
A) Abstract level reverse order.
B) Application level A) Stack
C) Implementation level B) Queue
D) All of the above C) List
4. Stack is also called as D) Link list
A) Last in first out 11. Which of the following is not the type of
B) First in last out queue?
C) Last in last out A) Ordinary queue
D) First in first out B) Single ended queue
5. Which of the following is true about the C) Circular queue
characteristics of abstract data types? D) Priority queue
i) It exports a type. 12. The property of binary tree is
ii) It exports a set of operations A) The first subset is called left subtree
A) True, False B) The second subtree is called right subtree
B) False, True C) The root cannot contain NULL
C) True, True D) The right subtree can be empty
D) False, False 13. State true or false.
6. ______ is not the component of data i) The degree of root node is always zero.
structure. ii) Nodes that are not root and not leaf are
A) Operations called as internal nodes.
B) Storage Structures A) True, True
C) Algorithms B) True, False
D) None of above C) False, True
7. Which of the following is not the part of D) False, False
ADT description? 14. Any node is the path from the root to the
A) Data node is called
B) Operations A) Successor node
C) Both of the above B) Ancestor node
D) None of the above C) Internal node
8. Inserting an item into the stack when stack D) None of the above
is not full is called ____ operation and
15. State true of false. (A) Weakly connected
i) A node is a parent if it has successor nodes. (B) Strongly Connected
ii) A node is child node if out degree is one. (C) Tightly Connected
A) True, True (D) Linearly Connected
B) True, False 22. In the traversal we process all of a vertex’s
C) False, True descendants before we move to an
D) False, False adjacent vertex.
16 .................. is not an operation performed (A) Depth First
on linear list (B) Breadth First
(C) With First
a) Insertion b) Deletion c) Retrieval (D) Depth Limited
d) Traversal
23. State True of False.
A) only a, b and c
i) Network is a graph that has weights or costs
B) only a and b associated with it.
C) All of the above ii) An undirected graph which contains no
D) None of the above cycles is called a forest.
17. Which is/are the application(s) of stack iii) A graph is said to be complete if there is no
A) Function calls edge between every pair of vertices.
B) Large number Arithmetic A) True, False, True
C) Evaluation of arithmetic expressions B) True, True, False
D) All of the above C) True, True, True
18. A ________is an acyclic digraph, which has D) False, True, True
only one node with indegree 0, and other 24. The number of comparisons done by
nodes have indegree 1. sequential search is _______
A) Directed tree (A) (N/2)+1
B) Undirected tree (B) (N+1)/2
C) Dis-joint tree (C) (N-1)/2
D) Direction oriented tree (D) (N+2)/2
19. ________Is a directed tree in which 25. In_____, search start at the beginning of
outdegree of each node is less than or the list and check every element in the list.
equal to two.
(A) Linear search
A) Unary tree
(B) Binary search
B) Binary tree
(C) Hash Search
C) Dinary tree
(D) Binary Tree search
D) Both B and C
26. State True or False.
20. State true or false.
i) Binary search is used for searching in a sorted
i) An empty tree is also a binary tree. array.
ii) In strictly binary tree, the outdegree of every ii) The time complexity of binary search is
node is either o or 2. O(logn).
A) True, False A) True, False
B) False, True B) False, True
C) True, True C) False, False
D) False, False D) True, True
21. A directed graph is_______if there is a path 27. Which of the following is not the internal
from each vertex to every other vertex in sort?
the digraph.
(A) Insertion Sort A) Lists
(B) Bubble Sort B) Linked Lists
(C) Merge Sort C) Trees
(D) Heap Sort D) Queues
28. State True or False. 34. What will be the value of top, if there is a
i) An undirected graph which contains no cycles size of stack STACK_SIZE is 5
is called forest. (A) 5
ii) A graph is said to be complete if there is an (B) 6
edge between every pair of vertices. (C) 4
A) True, True (D) None
B) False, True 35. is not the operation that can be performed
C) False, False on queue.
D) True, False A) Insertion
29. A graph is said to be ................. if the B) Deletion
vertices can be split into two sets V1 and C) Retrieval
V2 such there are no edges between two D) Traversal
vertices of V1 or two vertices of V2.
36. There is an extra element at the head of
(A) Partite the list called a ……….
(B) Bipartite
(A) Antinel
(C) Rooted
(B) Sentinel
(D) Bisects
(C) List header
30. In a queue, the initial values of front
(D) List head
pointer f rare pointer r should be ….. and ................................................................. respectively.
37. A graph is a collection of nodes, called
(A) 0 and 1
………. And line segments called arcs or ........................
(B) 0 and -1
pair of nodes.
(C) -1 and 0
(D) 1 and 0 (A) vertices, edges
31. In a circular queue the value of r will be .. (B) edges, vertices
(A) r=r+1 (C) vertices, paths
(B) r=(r+1)% [QUEUE_SIZE – 1] (D) graph node, edges
(C) r=(r+1)% QUEUE_SIZE 38. A ...........is a graph that has weights of
(D) r=(r-1)% QUEUE_SIZE costs associated with its edges.
32. Which of the following statement is true? (A) Network
i) Using singly linked lists and circular list, it is (B) Weighted graph
not possible to traverse the list backwards. (C) Both A and B
ii) To find the predecessor, it is required to (D) None A and B
traverse the list from the first node in case 39. In general, the binary search method needs
of singly linked list. no more than______comparisons.
A) i-only (A) [log2n]-1
B) ii-only (B) [logn]+2
C) Both i and ii (C) [log2n]
D) None of both (D) [log2n]+1
33. The advantage of ................ is that they
solve the problem if sequential storage
representation. But disadvantage in that is
they are sequential lists.
40. Linked lists are best suited.....
(A) For relatively permanent collections of 47. In a linked list the ............ field contains the
data. address of next element in the list.
(B) For the size of the structure and the data (A) Link field
in the structure are constantly changing. (B) Next element field
(C) data structure (C) Start field
(D) for none of above situation (D) Info field
48. _______refers to a linear collection of data
41. The operation of processing each element items.
in the list is known as ...... (A) List
(A) sorting (B) Tree
(B) merging (C) Graph
(C) inserting (D) Edge
(D) traversal 49. A run list is......
(A) small batches of records from a file
42. The situation when in a linked list (B) number of elements having same value
START=NULL is .... (C) number of records
(A) Underflow (D) number of files in external storage
(B) Overflow
(C) Houseful 50. A....... indicates the end of the list.
(D) Saturated (A) Guard
(B) Sentinel
43. Each node in singly linked list has........ fields. (C) End pointer
A. 2 (D) Last pointer
B. 3
C. 1 51. A......... is a linear list in which insertions and
D. 4 deletions are made to from either end of
44. In linked lists there are no NULL links in the structure.
(A) single linked list (A) circular queue
(B) linear doubly linked list (B) random of queue
(C) circular linked list (C) priority
(D) linked list (D) dequeue
45. Each node in a linked list must contain at 52. Indexing the. ....... element in the list is not
least ..... possible in linked lists.
(A) Three fields (A) middle
(B) Two fields (B) first
(C) Four fields (C) last
(D) Five fields (D) anywhere in between
46. The dummy header in linked list contain..... 53. A linear list in which the pointer points only
(A) first record of the actual data to the successive node is......
(B) last record of the actual data (A) singly linked list
(C) pointer to the last record of the actual (B) circular linked list
data (C) doubly linked list
(D) middle record of the actual data (D) none of the above
54. .......... may take place only when there is
some minimum amount (or) no
space left in free storage list.
(A) Memory management
(B) Garbage collection
(C) Recycle bin
(D) Memory management