Saturday, 21 October 2017

Multiple Choice Question on Data Structure & Algorithm Design:

Q1. Which of the following is a two-way list:
a: grounded header list
b: circular header list
c: linked list with header & trailer nodes
d: none of the above

Q2. The terms “push” and “pop” are related to:
a: array
b: lists
c: stacks
d: all of the above

Q3. The depth of a complete binary tree is given by:
a: n log n  
b: n log n +1
c: log n  
d: log n +1 


Q4. When representing any algebraic expression E which uses only binary operations in a 2-tree:
a: the variables in E will appear as external nodes and operations as internal nodes 
b: the operations in E will appear as external nodes and variables as internal nodes
c: the variables and operations in E will appear only as internal nodes   
d: the variables and operations in E appear only as external nodes
                
Q5. An algorithm that calls itself directly or indirectly is known as:
a: sub-algorithm
b: recursive algorithm
c: polish notation
d: traversal algorithm 

Q6. The inorder traversal of tree will yield a sorted listing of elements of tree:
a: binary tree
b: binary search tree
c: heaps
d: none of the above

Q7. Value of first linked list index is:
a: 1
b: 0
c: -1
d: none of these

Q8. A ________ is a data-structure that organizes data similar to a line in the super-market, where the first one in the line is the first to be out:
a: queue
b: stacks
c: any of the two above
c: none of these

Q9. Which of the following abstract data types is not used by integer abstract data type group?
a: short
b: int
c: float
d: long

Q10. In a heap tree:
a: value in a node is greater than every value in left subtree and smaller than right subtree
b: value in a node is greater than the value of its child nodes
c: both the above conditions
d: none of the above conditions

Q11. The variables which can be accessed by all modules in a program, are known as:
a: local variables
b: internal variables
c: external variables
d: global variables

Q12. The post order traversal of a binary tree is :DEBFCA, find out the preorder traversal:
a: ABFCDE
b: ADBFEC
c: ABDECF
d: ABDCEF

Q13. Which of the following algorithms is of divide and  conquer type:
a: bubble-sort
b: insertion sort
c: quick sort
d: all of the above

Q14. One of the applications of a  linked list:
a: Polynomial evaluation
b: Postfix expression evaluation
c: determining the distance traveled
d: none of these

Q15. A tree having any number of nodes:
a: binary tree
b: general tree
c: B-tree
d: AVL tree

Q16. A set of several trees that are not linked to each other in any way
a: Forest
b: Graphs
c: B-trees
d: none of these

Q17. All the non-leaf nodes except the root node in a multi-way search tree of order, n have atleast:
a: n-1 children
b: n children
c: n/2 children
d: n*2 children

Q18. Heaps are of two types:
a: high and low
b: max and min
c: B and B+
d: none of the above

Q19. Incase of min-heap, the value present in any node is:
a: greater than all its children
b: smaller than all its children
c: equal to all its children
d: greater than values in left subtree and smaller than values in right  subtree
                                                                           
Q20. A min-heap is also known as:
a: decreasing heap
b: descending heap
c: low heap
d: none of these


Thanks
Mukesh Rajput

No comments:

Post a Comment

Thanks
Mukesh Rajput