Top 350+ Solved Data Structure and Algorithms (DSA) MCQ Questions Answer
Q. A binary tree whose every node has either zero or two children is called
a. Complete binary tree
b. Binary search tree
c. Extended binary tree
d. None of above
Q. The depth of a complete binary tree is given by
a. Dn = n log2n
b. Dn = n log2n+1
c. Dn = log2n
d. Dn = log2n+1
Q. The complexity of Binary search algorithm is
a. O(n)
b. O(log )
c. O(n log n)
d. None of the above
Q. When in order traversing a tree resulted E AC K F H D B G; the preorder traversal would return
a. FAEKCDBHG
b. FAEKCDHGB
c. EAFKHDCBG
d. FEAKDCHBG
Q. When representing any algebraic expression E the following uses only binary operations in a 2-tree
a. the variable in E will appear as external nodes and operations in internal nodes
b. the operations in E will appear as exter- nal nodes and variables in internal nodes
c. the variables and operations in E will appear only in internal nodes
d. None of the above
Q. When converting binary tree into extended binary tree, all the original nodes in binary tree are
a. internal nodes on extended tree
b. external nodes on extended tree
c. vanished on extended tree
d. None of the above
Q. The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal
a. ABFCDE
b. ADBFEC
c. ABDECF
d. None of the above
Q. Which of the following data structure is lin- ear data structure?
a. Trees
b. Graphs
c. Arrays
d. None of the above
Q. The operation of processing each element in the list is known as
a. Merging
b. Inserting
c. Traversal
d. All the above
Q. Finding the location of the element with a given value is called
a. Traversal
b. Search
c. Sort
d. All of the above
Q. Arrays are best data structures for
a. relatively permanent collections of data
b. the size of the structure and the data in the structure are constantly changing
c. both of above situation
d. none of above situation
Q. Linked lists are best suited for
a. relatively permanent collections of data
b. the size of the structure and the data in the structure are constantly changing
c. both of above situation
d. none of above situation
Q. Each array declaration need not give, implicitlyor explicitly, the information about the
a. name of array
b. data type of array
c. first data from the set to be stored
d. index set of the array