0% found this document useful (0 votes)
25 views25 pages

Advanced Data Structure Compile MCQ

The document consists of multiple-choice questions (MCQs) covering various data structures including arrays, linked lists, stacks, queues, trees, AVL trees, and red-black trees. Each unit contains questions that assess knowledge on characteristics, operations, and properties of these data structures. The questions are designed for self-assessment in advanced data structure concepts.

Uploaded by

redrex618
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views25 pages

Advanced Data Structure Compile MCQ

The document consists of multiple-choice questions (MCQs) covering various data structures including arrays, linked lists, stacks, queues, trees, AVL trees, and red-black trees. Each unit contains questions that assess knowledge on characteristics, operations, and properties of these data structures. The questions are designed for self-assessment in advanced data structure concepts.

Uploaded by

redrex618
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

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-2. ARRAYS and Linked list


1. Which one is correct statement?
A. Search in array is delete an element from array
B. Search in array is find an element from array
C. Search in array is insert an element in array
D. None of above
2. Which is not correct syntax?
A. abcname[ ];
B. abcname[10];
C. abcname[3] = {20,25,35};
D. abcname[5] = {15;20;28};
3. Searching is a process in which we find element in array
A. True
B. False
4. Operations can be performed on array
A. Sorting
B. Merging
C. Traversing
D. All of above
5. To merge two arrays, how many variables are required (minimum)?
A. 1
B. 2
C. 5
D. 3
6. Elements of arrays are stored in ……….. memory locations
A. Random
B. Sequential
C. Both random and sequential
D. None of above
7. Which is correct statement?
A. Insertion at the given index of an array
B. Insertion after the given index of an array
C. Insertion before the given index of an array
D. All of above
8. Traversal is process of visit each element of an array
A. True
B. False
9. Which statement is incorrect?
1. int arr[MAX]= {10,12,15,20},i,val;
2. printf("the array element are \n’);
3. for(i=0;i<4;i++)
4. none of above
A. 1
B. 2
C. 3
D. 4
10. Array is___
A. A group of elements of same data type
B. Array elements are stored in memory in continuous or contiguous locations
C. An array contains more than one element
D. All of above
11. What are the advantages of arrays?
A. Objects of mixed data types can be stored
B. Easier to store elements of same data type
C. Elements in an array cannot be sorted
D. Index of first element of an array is 1
12. The index of the first element in an array is______
A. 1
B. 2
C. -1
D. 0
13. Linked list consist of…
A. Data field
B. Link field
C. Both data and link field
D. None of above
14. What are the shortcomings of array?
A. Memory allocation
B. Memory efficiency
C. Execution time
D. All of above
15. What are the types of linked list?
A. Single
B. Double
C. Circular
D. All of above
16. Operations performed on Linked list are…
A. Insertion
B. Deletion
C. Search
D. All of above
17. Insertion in Linked List can happen at following places
A. At the beginning of the linked list.
B. At the end of the linked list.
C. At a given position in the linked list.
D. All of above
18. Linked list is considered as an example of ___________ type of memory allocation
A. Static
B. Heap
C. Dynamic
D. Compile time
UNIT-3. Stacks.
1. Which method is followed by Stack?
A. FILO
B. LIFO
C. Both FILO and LIFO
D. None of above
2. Which is not stack operation?
A. count()
B. peek()
C. getche()
D. display()
3. Which is not part of stack?
A. Overflow
B. Enqueue
C. Underflow
D. None of above
4. To returns the element at the given position which function is used?
A. isEmpty()
B. isFull()
C. peek()
D. display()
5. Stack implementation is done using……
A. Array
B. Linked list
C. Both using array and linked list
D. None of above
6. Parenthesis checker is used for
A. Balanced Brackets
B. Unbalanced Brackets
C. Both balanced and unbalanced
D. None of above
7. Which is incorrect statement?
A. (a+b*(c/d))
B. [10+20*(6+7)}]
C. (x+y)/(c-d)
D. None of above
8. Which is not Sorting type
A. Bubble
B. Merge
C. Insertion
D. Linear
9. Tower of Hanoi is associated with….
A. Queue
B. Stack
C. Array
D. None of above
10. Arithmetic expressions can be represented as
A. Infix notation
B. Postfix notation
C. Prefix notation
D. All of above
11. Prefix notation can be represented as
A. operator operand1 operand2
B. operand1 operand2 operator
C. operand1 operator operand1
D. None of above
12. Postfix notation can be represented as
A. operator operand1 operand2
B. operand1 operator operand1
C. operand1 operand2 operator
D. None of above
13. Stack implementation is done using______
A. Statically
B. Dynamically
C. Both Statically and Dynamically
D. None of above
14. Which is not stack operation?
A. peek()
B. pop()
C. display()
D. printf()
15. Underflow condition occur when stack is_____
A. Full
B. Empty
C. Half
D. None of above
UNIT-4. Queues
1. Which technique is followed by queue?
A. FIFO
B. LIFO
C. Both LIFO and FIFO
D. None of above
2. Enqueue () operation is used to perform
A. Deletion
B. Insertion
C. Display
D. All of above
3. Which operation is part of queue
A. Peek
B. isFull
C. isEmpty
D. All of above
4. Queue implementation is done using
A. Array
B. Stack
C. Linked List
D. All of above
5. Which is not types of Queue
A. Circular
B. Simple
C. Complex
D. Priority
6. Queue is a____________ data structure.
A. Static
B. Linear
C. Dynamic
D. None of above
7. Front pointer and rear pointer are used in…
A. Implementation of Queue using Linked List
B. Implementation of Queue using array
C. Implementation of Queue using stack
D. All of above
8. Underflow condition represent.
A. It checks if the queue is full before enqueueing any element.
B. It checks if there exists any item before popping from the queue.
C. It checks whether all variables are declared
D. All of above
9. Overflow condition represent.
A. It checks if there exists any item before popping from the queue.
B. It checks whether all variables are initialized.
C. It checks if the queue is full before enqueueing any element.
D. All of above
10. Front pointer contains
A. Address of the starting element of the queue
B. Address of the last element of the queue.
C. Link for next element
D. All of above
11. Priority queue is a____________ data structure.
A. Static
B. Linear
C. Abstract
D. All of above
12. Priority queue types are
A. Ascending order
B. Descending order
C. Both ascending and descending order
D. None of above
13. Priority Queue Operations are
A. Deleting an Element from the Priority Queue
B. Peeking from the Priority Queue (Find max/min)
C. Extract-Max/Min from the Priority Queue
D. All of above
14. Priority Queue Implementation are performed using.
A. Linked list
B. Heap data structure
C. Binary search tree
D. All of above
15. Binary Heap can be divided into
A. Max heap
B. Min-heap.
C. Both max and min heap
D. None of above

UNIT-5. Search Trees.


1. Tree is a _______ hierarchical data structure.
A. Linear
B. Nonlinear
C. Abstract
D. All of above
2. Data access is quick and easier in
A. Nonlinear data structure
B. Linear data structure
C. Both Linear and Nonlinear
D. None of above
3. Types of trees are
A. Binary Tree
B. Binary Search Tree
C. AVL Tree
D. All of above
4. Binary search tree is also called.
A. Ordered
B. Sorted
C. Both ordered and sorted binary tree
D. None of above
5. value of the nodes in the left sub-tree is less than the value of the root is
A. General Tree
B. Binary Tree
C. Binary Search Tree
D. None of above
6. Types of Binary Trees are
A. Full binary tree
B. Complete binary tree
C. Perfect binary tree
D. All of above
7. Which is not Binary Tree operation?
A. Search
B. Peek
C. Insertion
D. Deletion
8. Binary Search Tree applications are
A. In multilevel indexing in the database.
B. For dynamic sorting.
C. It is used to implement various searching algorithms.
D. All of above
9. Binary Search Tree time complexity for search operation is
A. O(n)
B. O(1)
C. O(2)
D. None of above
10. Binary Search Tree time complexity for insert operation is
A. O(0)
B. O(1)
C. O(2)
D. None of above
11. What is the worst case time complexity for Delete operation?
A. O(0)
B. O(1)
C. O(n)
D. None of above
12. Which is incorrect statement about Binary search tree.
A. The left and right sub-trees should also be binary search trees
B. In order sequence gives decreasing order of elements
C. The left child is always lesser than its parent
D. The right child is always greater than its parent
13. To arrange binary tree in ascending order…
A. Pre order traversal only
B. Post order traversal only
C. In order traversal only
D. None of above
14. Which of the following is not component of binary tree
A. Data element
B. Pointer to right subtree
C. Super tree
D. Pointer to left subtree
15. Which of the following is not a type of tree data structure
A. General Tree
B. Primary Tree
C. Binary Tree
D. Binary Search Tree

UNIT-6. Tree Data Structure

1. AVL Tree is invented in


A. 1955
B. 1966
C. 1962
D. None of above
2. Which statement is true about AVL tree?
A. AVL tree controls the height of the binary search tree.
B. The time taken for all operations in a binary search tree of height h is O(h).
C. For skewed BST it can be extended to O(n) (worst case).
D. All of above
3. Balance Factor values in AVL tree is
A. -1
B. 0
C. 1
D. All of above
4. The balance factor in diagram is
A. 1
B. 0
C. 2
D. None of above
5. AVL Tree Rotations are
A. Right rotation
B. Left-Right rotation
C. Right-Left rotation
D. All of above
6. Left rotation and Right rotation are
A. Double rotations
B. Single rotation
C. Triple rotation
D. None of above
7. Which statement is true about AVL tree?
A. AVL tree is a self-balancing Binary Search Tree.
B. AVL Tree is defined as height balanced binary search tree.
C. In AVL tree each node is associated with a balance factor.
D. All of above
8. Left-Right rotation and Right-Left rotation are
A. Single rotation
B. Triple rotation
C. Double rotations
D. None of above
9. The balance factor in diagram is
A. 1
B. 0
C. 2
D. None of above
10. B Tree properties are
A. All leaf nodes must be at same level
B. All non-leaf nodes except root
C. A non-leaf node with n-1 keys must have n number of children
D. All of above
11. Which statement is true about B-tree?
A. Each node can contain more than one key
B. Each node can have more than two children.
C. A B Tree of order m can have at most m-1 keys and m children.
D. All of above
12. Diagram represents correct B-tree
A. True
B. False
13. Which is not B-tree operation
A. Search
B. Insert
C. Data manipulation
D. Delete
14. Insertion Operation can performed in B-tree at
A. Root node
B. Leaf node
C. Both root and leaf node
D. None of above
15. What are the different cases for deletion from B-Tree?
A. If the key is in the leaf node
B. If the key is in an internal node
C. If the key is in a root node
D. All 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-9. More on Heaps.


1. Heap sort is___
A. It is based upon Binary Heap data structure.
B. It is comparison-based sorting technique.
C. It processes the elements by creating the min heap or max heap using the elements of the
array.
D. All of above
2. Elements arranged in descending order __
A. Max heap
B. Min heap
C. Both Max and Min heap
D. None of above
3. Heapify is part of ___
A. Max heap
B. Min heap
C. Both Max and Min heap
D. None of above
4. Elements arranged in ascending order_
A. Max heap
B. Min heap
C. Both Max and Min heap
D. None of above
5. Complexity of the Heap Sort in worst case is___
A. (log 1)
B. (log n)
C. (n log n)
D. None of above
6. Given graph is example of ____
A. Min heap
B. Max heap
C. Both max and min heap
D. None of above
7. Binomial Heap is a collection of ___
A. Binary trees.
B. AVL trees.
C. Binomial trees.
D. None of above
8. In binomial tree B1 what are the numbers of nodes.
A. 0
B. 1
C. 2
D. 3
9. Operations of Binomial Heap __
A. Finding the minimum key
B. Creating a new binomial heap
C. Inserting a node
D. All of above
10. What is value of K in binomial tree B3?
A. 1
B. 2
C. 3
D. None of above
11. Properties of a Fibonacci Heap are___
A. It is a set of min heap-ordered trees.
B. It consists of a set of marked nodes.
C. The trees within a Fibonacci heap are unordered but rooted.
D. All of above
12. Which is not Fibonacci Heap operation.
A. Union
B. Extract Min
C. Peek
D. Decrease a key
13. A pointer is maintained in Fibonacci Heap at the __________ element node
A. Maximum
B. Minimum
C. Both minimum and maximum
D. None of above
14. The child nodes of a parent node are connected to each other through______
A. Doubly linked list
B. Singly linked list
C. Circular doubly linked list
D. None of above
15. Deleting a node from the tree in Fibonacci Heap takes_____time.
A. (1)
B. (0)
C. (log n)
D. None of above.

UNIT- 10. Graphs.


1. Graph is collection of ___
A. Vertices
B. Edges
C. Both vertices and edges
D. None of above
2. Which is not part of graph.
A. Path
B. Extract Min
C. Edge
D. Closed path
3. Types of Graph are____
A. Pseudo
B. Trivial
C. Disconnected
D. All of above
4. A complete graph is ______
A. Connected with all other nodes
B. Connected with bidirectional nodes
C. Connected with directional nodes
D. None of above
5. Graphs are commonly represent using ___
A. Adjacency Matrix
B. Adjacency List
C. Both Adjacency Matrix and Adjacency List
D. None of above
6. Two vertices is called adjacent.
A. If it there is no common edge
B. If it support at least two common edge
C. If it support at least one common edge
D. None of above
7. Applications of adjacency matrix are____
A. Navigation tasks
B. It is used to represent finite graphs
C. Creating routing table in networks
D. All of above
8. Image represent a ______
A. Undirected Weighted Graph
B. Directed Graph Representation
C. Undirected Graph Representation
D. None of above
9. To find the connected components of an undirected graph___
A. Depth-first search algorithm
B. Dijkstra's Algorithm
C. Centrality Algorithms
D. None of above
10. Strongly connected components are____
A. Undirected path between any two nodes
B. Directed path between any two nodes
C. It support at least two common edge
D. None of above
11. Graph represents ____
A. Undirected Connected Component
B. Bidirectional Connected Component
C. Strongly Connected Component
D. All of above
12. Which is not type of graph ___
A. Connected
B. Directed
C. Centrality
D. Bidirectional
13. Spanning tree is ____
A. Have more than one spanning tree
B. Have the same number of edges and vertices
C. Does not have any cycle / loops
D. All of above
14. Mathematical properties of spanning tree____
A. Has n-1 edges, n = number of nodes
B. Complete graph can have maximum nn-2 number of spanning trees
C. All of above
15. Minimum Spanning Tree is ______
A. The sum of the weight of the edges is as minimum as possible
B. The sum of the weight of the edges is as maximum as possible
C. The sum of the weight of the edges is as average as possible
D. None of above.

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-12. Hashing Techniques


1. Time complexity in hashing is ___
A. (log o)
B. (log n)
C. (1)
D. None of above
2. The values returned by a hash function are called ____
A. Hash values
B. Hash codes
C. Hash sums
D. All of above
3. Methods for calculating the hash function are____
a) Division method
b) Folding method
c) Mid square method
d) All of above
4. Hashing is process of__
A. Encrypt data
B. Converting an input of any length into a fixed size string
C. Calculate mean of number
D. None of above
5. Hash table components are_
A. Key
B. Value
C. Both key and value
D. None of above
6. Which operator is used in hashing ___
A. +
B. *
C. %
D. /
7. Which is not characteristics of hash function ____
A. Less collisions
B. Uniform Distribution
C. Static
D. All of above
8. Which is not a methods for calculating the hash function ____
A. Folding
B. Mid square
C. Square
D. Division
9. (h(x)= x%10), 10 represent in statement __
A. Size of hash function
B. Size of hash key
C. Size of hash table
D. None of above
10. (h(x)= x%10), x represent in statement _
A. Key value
B. Hash table size
C. Hash function
D. None of above
11. Fold shift and Fold boundary methods used in ___
A. Division method
B. Mid square method
C. Multiplication Method
D. None of above
12. h(k) = floor( n( kA mod 1 ) ), statement represent which method ____
A. Division method
B. Multiplication Method
C. Mid square method
D. Pairing method
13. Knuth recommends value for A is ____
A. 0.61803
B. 0.62347
C. 0.71803
D. None of above
14. Golden ratio is recommended by __
A. Smith K
B. Knuth
C. George S
D. None of above
15. In multiplication method the value of A is between _
A. 2 and 4
B. 2 and 3
C. 0 and 1
D. None of above.

UNIT-13. Collision Resolution


1. Which is part of collision resolution technique ___
A. Separate chaining
B. Open addressing
C. Double hashing
D. All of above
2. Open addressing includes ____
A. Linear probing
B. Quadratic probing
C. Double hashing
D. All of above
3. In Load factor α = n/m, m represent ____
A. Number of keys
B. Number of slots in hash table
C. Hash function
D. None of above
4. In Load factor α = n/m, n represent __
A. Number of slots in hash table
B. Hash function
C. Number of keys to be inserted in hash table
D. None of above
5. Worst-case complexity for searching in Separate chaining is _
A. Log (1)
B. (n)
C. log (0)
D. None of above
6. Worst-case complexity for deletion in Separate chaining is _
A. (n)
B. log (1)
C. log (2)
D. None of above
7. Advantages of separate chaining.
A. It is less sensitive to the function of the hashing
B. The hash table never fills full, so we can add more elements to the chain
C. It is easy to implement
D. All of above
8. Quadratic probing is part of __
A. Open hashing
B. Closed hashing
C. Linear probing
D. None of above
9. Double hashing is part of ___
A. Open hashing
B. Closed hashing
C. Linear probing
D. All of above
10. Which is not part of open addressing.
A. Linear probing
B. Quadratic probing
C. Open hashing
D. All of above
11. Operations in Open Addressing are ___
A. Insert
B. Delete
C. Search
D. All of above
12. In open addressing __
A. All elements are stored in the hash table itself
B. The size of the table must be greater than or equal to the total number of keys.
C. During insertion, if a collision is encountered, alternative cells are tried until an empty
bucket is found.
D. All of above
13. Clustering is major problem in _
A. Linear probing
B. Quadratic probing
C. Double hashing
D. None of above
14. Which one is most relevant to Quadratic Probing?
A. h(k) = k mod 10
B. h(k, i) = (h(k)+i2) mod 10
C. h(k, i) = (h(k)+i) mod 10
D. None of above
15. Which one is not relevant to Linear Probing?
A. h(k, i) = (h(k)+i) mod 10
B. h(k) = k mod 10
C. h(k, i) = (h(k)+i2) mod 10
D. None of above

UNIT-14.

1. Which statement is correct about open addressing?


A. It requires a hash table with fixed and known size.
B. All elements are stored in the hash table itself
C. The size of the table must be greater than or equal to the total number of keys.
D. All of above
2. In double hashing prime value is __
A. Less than table size
B. Greater than table size
C. Equal to table size
D. None of above
3. In double hashing how many hash functions used.
A. 4
B. 2
C. 1
D. 3
4. Which statement is correct about double hashing?
A. The second hash function is used to provide an offset value in case the first function causes
a
collision.
B. In double hashing, there are two hash functions.
C. Second hash function used to remove the collision when you encountered the collision.
D. All of above
5. Which hash function used in double hashing?
A. (h1(key) + h2(key)) mod Table size
B. (h1(key) + i * (key)) mod Table size
C. (h1(key) + i * h2(key)) mod Table size
D. None of above
6. In which situation second hash function is used in double hashing?
A. In case table size is smaller
B. In case the first function causes a collision
C. In case first hash function provide zero value
D. None of above
7. In statement- h2(key) = 7 – (key mod 7), 7 represent _
A. Table size
B. Key value
C. Prime number
D. None of above
8. Which statement is correct for double hashing technique?
A. No primary clustering
B. No secondary clustering
C. Double hashing can find the next free slot faster than the linear probing approach
D. All of above
9. Which statement is correct about rehashing?
A. In which the table is resized
B. It is process of re-calculating the hash code of already stored entries
C. It is a collision resolution technique
D. All of above
10. In Load factor =n/m, m represents _
A. Number of element
B. Number of key values
C. Number of bucket
D. None of above
11. In which situations rehashing is required.
A. When table is completely full.
B. With quadratic probing when the table is filled half.
C. When insertions fail due to overflow.
D. All of above
12. The value of Load factor in rehashing should be__
a) Less than 1
b) Greater then 1
c) Equal to 0
d) All of above
13. In Load factor =n/m, n represents _
A. Number of bucket
B. Number of element
C. Number of key values
D. None of above
14. Table size is 3 and elements are 12, 13, and 14. Load factor is_
A. 3
B. 2
C. 1
D. 0
15. What is notation for load factor?
A. λ
B. ∞
C. µ
D. Ω

You might also like