[
{
"question": "A tree whose left subtree and right subtree differ in height by at most 1 unit is called .....",
"options": ["A) Lemma tree", "B) Redblack tree", "C) AVL tree", "D) None of the above"],
"answer": 2,
"explanation": "An AVL tree is a self-balancing binary search tree where the difference between heights of left and right subtrees cannot be more than one."
},
{
"question": "Which of the following is a non-linear data structure?",
"options": ["A) Trees", "B) Stacks", "C) Strings", "D) All of the above"],
"answer": 0,
"explanation": "Trees are non-linear data structures, whereas stacks and strings are linear data structures."
},
{
"question": "The number of comparisons done by sequential search is .......",
"options": ["A) (N/2) + 1", "B) (N + 1) / 2", "C) (N - 1) / 2", "D) (N - 2) / 2"],
"answer": 1,
"explanation": "On average, sequential search makes (N + 1) / 2 comparisons because it checks elements one by one until it finds the target."
},
{
"question": "Which of the following is not an operation that can be performed on a queue?",
"options": ["A) Traversal", "B) Insertion", "C) Deletion", "D) Retrieval"],
"answer": 0,
"explanation": "Traversal is generally not considered a standard operation on queues since queues operate on FIFO principle with insertion and deletion operations."
},
{
"question": "Which is/are the application(s) of stack?",
"options": ["A) Function calls", "B) Large number Arithmetic", "C) Evaluation of arithmetic expressions", "D) All of the above"],
"answer": 3,
"explanation": "Stacks are used in function calls, handling large number arithmetic, and evaluating arithmetic expressions, making all these applications correct."
},
{
"question": "Which of the following data structures are indexed structures?",
"options": ["A) Stack", "B) Linked lists", "C) Linear arrays", "D) None of the above"],
"answer": 2,
"explanation": "Linear arrays are indexed structures as they allow direct access to elements via an index, unlike stacks and linked lists."
},
{
"question": "Which of the following data structures store homogeneous data elements?",
"options": ["A) Lists", "B) Pointers", "C) Records", "D) Arrays"],
"answer": 3,
"explanation": "Arrays store homogeneous data elements (all elements of the same type). Records can store heterogeneous data."
},
{
"question": "Linear arrays are also called.......",
"options": ["A) One-dimensional array", "B) Vertical array", "C) Horizontal array", "D) All of the above"],
"answer": 0,
"explanation": "Linear arrays are one-dimensional arrays representing a single row or column."
},
{
"question": "A ......... does not keep track of address of every element in the list.",
"options": ["A) Stack", "B) Queue", "C) String", "D) Linear array"],
"answer": 3,
"explanation": "Linear arrays store elements contiguously in memory so individual addresses are not needed for each element."
},
{
"question": "The complexity of linear search algorithm is",
"options": ["A) O(n)", "B) O(log n)", "C) O(n^2)", "D) O(n log n)"],
"answer": 0,
"explanation": "Linear search checks each element one by one, leading to O(n) time complexity."
},
{
"question": "The complexity of binary search algorithm is",
"options": ["A) O(n)", "B) O(log n)", "C) O(n^2)", "D) O(n log n)"],
"answer": 1,
"explanation": "Binary search divides the search interval in half each time, leading to O(log n) time complexity."
},
{
"question": "Can linked list be implemented using arrays?",
"options": ["A) Yes", "B) No"],
"answer": 0,
"explanation": "Linked lists can be implemented using arrays by storing the next element's index as a pointer."
},
{
"question": "Two dimensional arrays are also called",
"options": ["A) tables arrays", "B) matrix arrays", "C) both of above", "D) none of above"],
"answer": 2,
"explanation": "Two-dimensional arrays are commonly referred to as tables or matrix arrays."
},
{
"question": "Can stack be described as a pointer?",
"options": ["A) Yes", "B) No"],
"answer": 0,
"explanation": "Stacks can be implemented using pointers to efficiently manage insertion and deletion at one end."
},
{
"question": "Which of the following linked list below have last node of the list pointing to the first node?",
"options": ["A) circular doubly linked list", "B) circular linked list", "C) circular singly linked list", "D) doubly linked list"],
"answer": 0,
"explanation": "In a circular doubly linked list, the last node points to the first node and vice versa."
},
{
"question": "Items in a priority queue are entered in a _____________ order",
"options": ["A) random", "B) order of priority", "C) as and when they come", "D) none of the above"],
"answer": 0,
"explanation": "According to the original provided answer, items are entered in random order in a priority queue though typically priority queues handle insertion based on priority."
},
{
"question": "An empty list is the one which has no",
"options": ["A) nodes", "B) data", "C) both a and b above", "D) address"],
"answer": 2,
"explanation": "An empty list has neither nodes nor data; both conditions apply."
},
{
"question": "Which data structure allows deleting data elements from front and inserting at rear?",
"options": ["A) Stacks", "B) Queues", "C) Deques", "D) Binary search tree"],
"answer": 1,
"explanation": "Queues are FIFO structures where insertion happens at rear and deletion happens from front."
},
{
"question": "Identify the data structure which allows deletions at both ends of the list but insertion at only one end.",
"options": ["A) Input-restricted deque", "B) Output-restricted deque", "C) Priority queues", "D) None of above"],
"answer": 0,
"explanation": "Input-restricted deque allows insertions only at one end but deletions at both ends."
},
{
"question": "Which of the following data structures is non-linear type?",
"options": ["A) Strings", "B) Lists", "C) Trees", "D) Arrays"],
"answer": 2,
"explanation": "Trees are non-linear data structures; strings, lists, and arrays are linear."
}
]