Data Structure Mcqs
Data Structure Mcqs
B) Red-black tree
C) Lemma tree
C) Implementation level
5. Which of the following is true about the characteristics of abstract data types?
i) It exports a type.
ii) It exports a set of operations
A) True, False B) False, True C) True, True D) False, False
6. is not the component of data structure.
A) Operations
B) Storage Structures
B) Operations
8. Inserting an item into the stack when stack is not full is called . Operation and
deletion of item form the stack, when stack is not empty is called ..operation.
9. . Is a pile in which items are added at one end and removed from the other.
A) Stack
B) Queue
C) List
10. is very useful in situation when data have to stored and then retrieved in
reverse order.
A) Stack
B) Queue
11. Which data structure allows deleting data elements from and inserting at rear?
A) Stacks
B) Queues
C) Dequeues
12. Which of the following data structure can't store the non-homogeneous data
elements?
A) Arrays
B) Records
C) Pointers D) Stacks
13. A ....... is a data structure that organizes data similar to a line in the supermarket,
where the first one in line is the first one out.
A) Queue linked list
B) Stacks
C) Binary tree
D) Queues
16. Which data structure is used in breadth first search of a graph to hold nodes?
A) Stack B) queue
C) Tree
D) Array
17. Identify the data structure which allows deletions at both ends of the list but
insertion at only one end.
A) Input restricted dequeue
B) Output restricted qequeue
B) Lists
C) Stacks D) Graph
B) Trees
C) Binary tree
D) Stack
B) Priority
C) Tree
Answers:
1. D) All of the above
2. A) AVL tree
3. C) Implementation level
4. A) Last in first out
5. C) True, True
6. D) None of above
7. D) None of the above
8. A) push, pop
9. B) Queue
10. A) Stack
11. B) Queues
12. A) Arrays
13. A) Queue linked list
14. D) Trees
15. C) Binary tree
16. B) queue
17. A) Input restricted dequeue
18. D) Graph
19. D) Stack
20. C) Tree
D) Graph
1) ......... form of access is used to add and remove nodes from a queue.
C. Both a and b
D.
B. TOP fields
C. LINK fields
D. NULL fields
A. LIFO
B. FIFO
C. Both A and B
D. None of these
4) In the linked representation of the stack ......... behaves as the top pointer
variable of stack.
A. Stop pointer
D. Avail pointer
B. Back
C. Middle
D. Both A and B
6) In linked representation of stack the null pointer of the last node in the list
signals ..........
A. Beginning of the stack B. Bottom of the stack C. Middle of the stack
In between some value
D.
8) A queue is a .........
A. FIFO
B. LIFO
C. FILO
D. LOFI
B. LIFO lists
C. Piles
B. pop
C. retrieval
D. access
B. Lists
C. Stacks
D. Trees
B. FRONT
C. TOP
D. REAR
B. Hierarchical
C. Alternative
D. Sequential
B. push
C. pop
D. top
B. Pull
C. Pop
D. Pump
B. FIFO
C. LRU
D. RANDOM
17) .......... is the term used to delete an element from the stack.
A. Push
B. Pull
C. Pop
D. Pump
B. rear
C. top
D. list
19) A pointer variable which contains the location at the top element of the
stack is called .....
A. Top
B. Last
C. Final
D. End
Answers:
B. tower of Hanoi
C. infix to postfix
D. all
1) The queue in which the insertion takes place in the first position after of last element
is a ......
A. priority
B. dequeue
C. circular
D. linked
2) Before inserting into stack one must check the condition .........
Answers:
1) C. circular
2) A. Overflow
3) C. double ended queue
4) B. Underflow
5) D. both the ends
6) A. Before insertion
7) C. priority
8) A. Node pointed by the start process
9) A. FIFO lists
10) A. Front=Null
11) B. Special queue
12) C. An element is added in a queue
13) D. All of the above
14) A. Double ended queue
15) D. All of the above
16) A. Priority queue
17) C. pop
18) A. Neighbouring
19) C. top
20) A. Decrease the numbers of times overflow may occur
..
Answers:
1) D. traversal
2) D. Digraph
3) A. Threaded trees
4) C. Unliterally connected
5) B. Terminal nodes
6) A. free graph
7) D. Copies
8) D. All of the above
9) B. Predecessor
10) D. both b and c
11) A. Array with pointers
12) D. All of the above
13) C. Empty
14) C. extended binary tree
15) C. 3
16) D. Dn = log2n+1
17) D. External node
18) C. Root, Left sub-tree, Right sub-tree
19) C. Internal node
20) B. Leaf
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1) The post order traversal of binary tree is DEBFCA. Find out the pre order
traversal.
A. ABFCDE
B. ADBFEC
C. ABDECF
D. ABDCEF
2) While converting binary tree into extended binary tree, all the original
nodes in binary tree are .......
3) The in-order traversal of tree will yield a sorted listing of elements of tree
in ........
A. binary trees
B. binary search trees
C. heaps
D. binary heaps
A. Leaf
B. Branch
C. Path D. Thread
A. values in a node is greater than every value every value in left sub tree
and smaller than right sub tree.
B. values in a node is greater than every value in children of it.
C. conditions.
D. terms.
6) The in order traversal of tree will yield a sorted listing of elements of tree
in ....
A. Binary trees
B. Binary search trees
C. Merging
D. AVL Trees
A. isolated
B. complete
C. finite
D. strongly connected.
10) The post order traversal of a binary tree is DEBFCA. Find out the pre
order Traversal.
A. ABFCDE
B. ADBFEC
C. ABDECF
D. ABDCEF
A. FAEKCDBHG
B. FAEKCDHGB
C. EAFKHDCBG
D. FEAKDCHBG
A. isolated
B. complete
C. finite
D. strongly connected
A. Absolute
B. Entire
C. Inclusive
D. Complete
A. Info
B. Root
C. Threads
D. Child
A. Tagged
B. Marked
C. Lebeled
D. Sticked
Answers:
1) C. ABDECF
2) A. Internal nodes on extended tree
3) B. binary search trees
4) D. Thread
5) B. values in a node is greater than every value in children of it.
6) B. Binary search trees
7) B. e begins at u and ends at v
8) C. Extended binary tree
9) B. complete
10) C. ABDECF
11) D. all of the above
12) B. FAEKCDHGB
13) D. All of above
14) A. Data
15) B. complete
16) D. Pre-order, in-order, post-order
17) D. Complete
18) C. Threads
19) C. Lebeled
20) C. Both left & right sub trees are empty
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
6. In , search start at the beginning of the list and check every element in
the list.
A) Linear search
B) Binary search
C) Hash Search
D) Binary Tree search
10. A graph is said to be if the vertices can be split into two sets V1 and
V2 such there are no edges between two vertices of V1 or two vertices of V2.
A) Partite
B) Bipartite
C) Rooted
D) Bisects
11. In a queue, the initial values of front pointer f rare pointer r should be ..
and .. respectively.
A) 0 and 1
B) 0 and -1
C) -1 and 0
D) 1 and 0
15. What will be the value of top, if there is a size of stack STACK_SIZE is 5
A) 5
B) 6
C) 4
D) None
18. A graph is a collection of nodes, called . And line segments called arcs or
.. that connect pair of nodes.
A) vertices, edges
B) edges, vertices
C) vertices, paths
D) graph node, edges
19. A .. is a graph that has weights of costs associated with its edges.
A) Network
B) Weighted graph
C) Both A and B
D) None A and B
B. 3
C. 1
D. 4
B. 1
C. -1
D. 2
11) In a linked list the .......... field contains the address of next element in the list.
16) A ........ is a linear list in which insertions and deletions are made to from either end
of the structure.
Answers:
1) B. for the size of the structure and the data in the structure are constantly changing.
2) D. traversal
3) A. Underflow
4) A. 2
5) D. List traversed in two directions
6) B. AVAIL
7) A. 0
8) C. circular linked list
9) B. Two fields
10) A. first record of the actual data
11) A. Link field
12) B. predecessor node
13) A. List
14) A. small batches of records from a file
15) B. Sentinel
16) D. dequeue
17) A. middle
18) A. singly linked list
19) B. Garbage collection
20) B. circular linked list
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1) Finding the location of a given item in a collection of items is called ......
A. Discovering
B. Finding
C. Searching
D. Mining
11) .......... sorting is good to use when alphabetizing large list of names.
A. Merge B. Heap
C. Radix
D. Bubble
B. shell sort
13) Which of the following sorting algorithm is of divide and conquer type?
A. Bubble sort
B. Insertion sort
C. Quick sort
D. Merge sort
14) Merging k sorted tables into a single sorted table is called ......
A. k way merging
Answers:
1) C. Searching
2) C. Merge Sort
3) A. Insertion sort
4) D. Tree Sort
5) B. Primary key
6) D. O(n logn)
7) D. Smallest element
8) D. partition and exchange sort
9) C. Merging
10) C. heap
11) C. Radix
12) D. selection sort
13) C. Quick sort
14) A. k way merging
15) B. Hash function
16) C. Radix
17) A. O(n logn)
18) C. Quick
19) D. O(n logn)
20) B. O(n2)
Answers:
1. B) Single ended queue
2. D) The right ..... empty
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2) If the number of records to be sorted is small, then ...... sorting can be efficient.
A. Merge
3) The complexity of sorting algorithm measures the ...... as a function of the number n
of items to be sorter.
B. O(logn)
C. O(n2)
D. O(n logn)
D. i-False, ii-False
B. O(logn)
C. O(n2)
D. O(n logn)
12) .......... is putting an element in the appropriate place in a sorted list yields a larger
sorted order list.
A. Insertion
B. Extraction C. Selection
D. Distribution
13) ............order is the best possible for array sorting algorithm which sorts n item.
B. O(n2)
C. O(n+logn)
D. O(logn)
14) ......... is rearranging pairs of elements which are out of order, until no such pairs
remain.
A. Insertion
B. Exchange
C. Selection
D. Distribution
B. Insertion
C. Heap
D. Quick
16) Which of the following sorting algorithm is of divide and conquer type?
A. Bubble sort
D. Selection sort
17) ........ sorting algorithm is frequently used when n is small where n is total number of
elements.
A. Heap
B. Insertion
C. Bubble
D. Quick
18) Which of the following sorting algorithm is of priority queue sorting type?
A. Bubble sort
B. Insertion sort
C. Merge sort
D. Selection sort
19) Which of the following is not the required condition for binary search algorithm?
A. The list must be sorted
B. There should be the direct access to the middle element in any sub list
C. There must be mechanism to delete and/or insert elements in list.
D. Number values should only be present
B. tree sort
C. heap sort
D. bubble sort
Answers:
1) D. Item is the last element in the array or item is not there at all
2) C. Selection
3) B. running time
4) D. binary search algorithm is not efficient when the data elements more than 1500.
5) A. when item is somewhere in the middle of the array
6) D. pointer array
7) A. O(n)
8) C. Both of the above
9) C. O(n2)
10) B. i-True, ii-False
11) D. O(n logn)
12) A. Insertion
13) C. O(n+logn)
14) B. Exchange
15) A. Radix sort
16) C. Merge sort
17) B. Insertion
18) D. Selection sort
19) C. There must be mechanism to delete and/or insert elements in list.
20) A. quick sort