Made with ScholarlyMake flashcards like these from your own notes
Question:How are array elements stored in memory?
Answer:Contiguously
Question:Which of the following is not a linear data structure?
Answer:Tree
Question:Which notation describes the upper bound of an algorithm?
Answer:Big O
Question:Which of the following information holds true for an abstract data type?
Answer:The ADT implementation is hidden
Question:Which traversal of BST prints data in sorted order?
Answer:Inorder
Question:Inserting sorted elements into a BST results in?
Answer:Skewed tree
Question:The topmost node of a tree is called?
Answer:Root
Question:In a singly linked list, each node contains?
Answer:Data and pointer to next node
Question:The last node in a circular linked list points to?
Answer:First node
Question:A tree with a maximum of two children is a?
Answer:Binary Tree
Question:Which is a real-world example of a stack?
Answer:Stack of plates
Question:What does space complexity measure?
Answer:Memory required during execution
Question:If an algorithm takes constant time, what is its complexity?
Answer:O(1)
Question:Which of the following is an example of divide and conquer algorithm?
Answer:Binary Search
Question:Adding an element to a stack is called?
Answer:Push
Question:The number of edges from root to node is called?
Answer:Depth
Question:What is the main disadvantage of arrays?
Answer:Fixed size
Question:A stack follows which order?
Answer:LIFO
Question:What is a data structure?
Answer:A way of organizing data for efficient use
Question:What is the time complexity for accessing an element in an array?
Answer:O(1)
Question:How is time complexity measured?
Answer:By counting the number of primitive operations performed by the algorithm on a given input size.
Question:In inorder traversal, nodes are visited in which order?
Answer:Left-Root-Right
Question:Which of the following best describes an Abstract Data Type (ADT)?
Answer:Logical description of operations
Question:Which of the following operations has the best time complexity on an array?
Answer:Accessing an element by index
Question:Removing an element from a queue is called?
Answer:Dequeue
Question:Which data structure is best suited for implementing recursion?
Answer:Stack
Question:In a BST, the right subtree contains?
Answer:Larger elements
Question:A queue follows which order?
Answer:FIFO
Question:A doubly linked list has?
Answer:Two pointers per node
Question:A full binary tree has?
Answer:Every node with 0 or 2 children
Question:In a binary search tree, which traversal yields nodes in descending order?
Answer:Inorder (Right-Root-Left)
Question:In preorder traversal, nodes are visited in which order?
Answer:Root-Left-Right
Question:A circular queue helps to?
Answer:Reuse memory slots
Question:Removing an element from a stack is called?
Answer:Pop
Question:What defines an algorithm?
Answer:A step-by-step method to solve a problem
Question:Why are data structures important?
Answer:They help organize and manage data efficiently
Question:Which of the following operations is inefficient in linked lists?
Answer:Random access
Question:The number of children of a node is called its?
Answer:Degree
Question:Which is a good example of a queue?
Answer:Waiting line in a bank
Question:Adding an element to a queue is called?
Answer:Enqueue
Question:What is the main advantage of linked lists over arrays?
Answer:Dynamic size
Question:In postorder traversal, nodes are visited in which order?
Answer:Left-Right-Root
Question:In a BST, the left subtree contains?
Answer:Smaller elements
Question:A two-dimensional array is also called?
Answer:Matrix
Question:What does time complexity measure?
Answer:Execution time based on input size
Question:What is the index of the first element in an array?
Answer:0
Question:What happens when you pop from an empty stack?
Answer:Stack underflow
Question:Nodes with no children are called?
Answer:Leaves
Question:Which of the following best describes the useful criterion for comparing the efficiency of algorithms?
Answer:Both time and memory