Advanced Data Structure Compile MCQ
Advanced Data Structure Compile MCQ
UNIT-1.
Self Assessment
1. Which is type of data structure.
A. Primitive
B. Non-primitive
C. Both primitive and non-primitive
D. None of above
2. Which of the following is linear data structure?
A. Trees
B. Arrays
C. Graphs
D. None of these
3. Which of the following is non-linear data structure?
A. Array
B. Linked lists
C. Stacks
D. None of these
4. User defined data type is also called?
A. Primitive
B. Identifier
C. Non-primitive
D. None of these
5. Stack is based on which principle
A. FIFO
B. LIFO
C. Push
D. None of the Above
6. What are the characteristics of an Algorithm.
A. Clear and Unambiguous
B. Finite-ness C. Feasible
D. All of above
7. A procedure for solving a problem in terms of action and their order is called as
A. Program instruction
B. Algorithm
C. Process
D. Template
8. Algorithm can be represented as
A. Pseudocode
B. Flowchart
C. None of the above
D. Both Pseudocode and Flowchart
9. What are the different types of Algorithms?
A. Brute force algorithms
B. Greedy algorithms
C. Backtracking algorithms
D. All of these
10. Which is algorithm complexity.
A. Space Complexity
B. Time Complexity
C. Both space and time complexity
D. None of aboveone of these
11. Which one is asymptotic notations?
A. Big-O notation
B. Omega notation
C. Theta notation
D. All of above
12. Big-O Notation represents…
A. Space complexity
B. Upper bound of the running time of an algorithm
C. Lower bound of the running time of an algorithm
D. None of above
13. Omega Notation (Ω-notation) represents….
A. Upper bound of the running time of an algorithm
B. Space complexity
C. Lower bound of the running time of an algorithm
D. None of above
14. Which is property of Asymptotic Notations?
A. Reflexive
B. Symmetric
C. Transpose Symmetric
D. All of these
15. Abstract Data Type having.
A. Value definition
B. Operation definition
C. Both value and operation definition
D. None of above.
UNIT-7.
1. Red Black Tree invented in
A. 1960
B. 1972
C. 1976
D. None of above
2. The height of a Red-Black tree is
A. O(1)
B. O(log n)
C. O(0)
D. None of above
3. The color of the root in red black tree is
A. Red
B. Black
C. Green
D. All of above
4. Red-Black Tree must be
A. AVL tree
B. BST
C. Binary tree
D. All of above
5. What is color of newly inserted node in red-black tree
A. Red
B. Black
C. Blue
D. None of above
6. Recolor and Rotation performed in
A. Insertion
B. Deletion
C. Both insertion and deletion
D. Search
7. 90-10 rule is part of
A. BST
B. Binary tree
C. Splay tree
D. All of above
8. Left rotation is also called
A. Zig rotation
B. Zag rotation
C. Zag-zag rotation
D. None of above
9. Two right rotations is equal to
A. Zag zag
B. Zag zig
C. Zig zig
D. All of above
10. What are factors for selecting a type of rotation
A. Does the node which we are trying to rotate have a grandparent?
B. Is the node left or right child of the parent?
C. Is the node left or right child of the grandparent?
D. All of above
11. What are the operations performed on Splay Tree
A. Insertion
B. Deletion
C. Search
D. All of above
12. 2-node is
A. A node with a double data element that has two child nodes.
B. A node with a single data element that has two child nodes.
C. A node with a single data element that has one child nodes.
D. All of above
13. 3-node is
A. A node with two data elements that has three child nodes
B. A node with three data elements that has three child nodes
C. A node with two data elements that has two child nodes
D. None of above
14. Is diagram represent correct 3-node tree?
A. True
B. False
15. Properties of 2-3 Trees are
A. Data stored in sorted manner
B. Every internal node in the tree is a 2-node or a 3-node
C. Insertion operation performed in leaf node
D. All of above.
UNIT-8. Heaps
1. Heap satisfy following properties
A. Structural property
B. Ordering property
C. Both Structural and Ordering property
D. None of above
2. What are the types of Heap
A. Max-Heap
B. Min-Heap
C. Both Max-Heap and Min-Heap
D. None of above
3. Which is correct option for Max-Heap? D
4. Which is correct option for Min-Heap? B
5. In which heap the root node must be greatest among the keys present at all of its children?
A. Max-heap
B. Min-heap
C. Both A and B
D. None of the above
6. Heap can be used to perform___
A. A decreasing order array
B. Normal Array
C. Priority queue
D. Stack
7. What is the complexity of adding an element to the heap?
A. O(log n)
B. O(log h)
C. Both O(log n) and O(log h)
D. None of above
8. In the worst case, the time complexity of inserting a node in a heap would be
A. O(logN)
B. O(1)
C. O(H)
D. None of above
9. Applications of heap are___
A. Priority queue implementation
B. Heap sort
C. Order statistics
D. All of above
10. Priority queue types are__
A. Max
B. Min
C. Descending order
D. All of above
11. Which is not Priority queue operation?
A. Delete
B. Peeking from the Priority Queue
C. Isfull
D. Extract-Max/Min from the Priority Queue
12. What are the methods used to implement Priority Queue?
A. Arrays,
B. Linked list,
C. Heap data structure and binary search tree
D. All of above
13. Which is most efficient way to implementing the priority queue?
A. Arrays,
B. Linked list,
C. Heap data structure
D. Binary search tree
14. What are the applications of Priority Queue
A. Dijkstra's algorithm for shortest path
B. It is used in prim's algorithm
C. It is used in heap sort
D. All of above
15. What is the time complexity to insert a node based on key in a priority queue?
A. O(nlogn)
B. O(n)
C. O(1)
D. O(n2)
UNIT-11.
1. Which is not Graph traversal algorithm___
A. Breadth First Search
B. Depth First Search
C. Euclidean algorithm
D. Dijkstra's Algorithm
2. Time complexity of the BFS algorithm is ____
A. Log n
B. (V + E)
C. (log 1)
D. log n
3. Breadth First Search algorithm use ____ data structure.
A. Stack
B. Queue
C. Linked list
D. All of above
4. Depth First Search applications are___
A. Path Finding.
B. Cycle detection in graphs.
C. Topological Sorting.
D. All of above
5. Space complexity of the BFS algorithm is ____
A. Log n
B. (V + E)
C. (V)
D. log n
6. Breadth First Search algorithm use ____ data structure.
A. Queue
B. Linked list
C. Stack
D. All of above
7. Network flow Problems defines___
A. To find a flow with minimum value.
B. To find a flow with maximum value.
C. To find a flow with average value.
D. All of above
8. Which is not network flow problem____
A. Multi-commodity
B. Minimum-cost
C. Travelling salesman problem
D. Nowhere-zero
9. Algorithm used for network flow problem are ____
A. Dinic's algorithm
B. Edmonds–Karp algorithm
C. Out-of-kilter
D. All of above
10. Floyd Warshall Algorithm is used for ___
A. To find a flow with average value.
B. Travelling salesman problem
C. All Pairs Shortest Path problem.
D. All of above
11. Time complexity of Floyd-Warshall Algorithm ____
A. log n
B. O(|V|3)
C. O(|V|2)
D. All of above
12. Space complexity of Floyd-Warshall Algorithm ____
A. (log 2)
B. log 1
C. O(|V|3)
D. O(|V|2)
13. Topological Sorting is possible if ___
A. Graph is a Directed cyclic Graph
B. Graph is a Directed Acyclic Graph
C. Graph is an undirected Acyclic Graph.
D. All of above
14. Applications of topological sort are ____
A. Data Serialization
B. Instruction Scheduling
C. Scheduling jobs from the given dependencies among jobs
D. All of above
15. The In-degree of starting vertex in topological sort graph is ____
A. 1
B. 0
C. 2
D. 4.
UNIT-14.