Data Structures Practice Questions
Chapter 1
A. Points To Ponder
State True or False
- Structured data types include operations performed on data types. F
- One disadvantage of the hash algorithm is inefficient memory usage. T
Fill in the blanks
- A data structure is a logical method of representing data in memory.
- In the binary tree algorithm, the deletion procedure is complex.
B. Points To Ponder
State True or False
- A program can always be terminated.F
- The complexities are ADDED for nested loops.F
Fill in the blanks
- Space Complexity refers to the amount of storage the algorithm consumes
- The assertion given in the beginning segment in an algorithm is called a precondition.
C. Points To Ponder
State True or False
- When an element needs to be removed from the stack, the pop operation is performed.T
- In a preorder traversal, the root node is visited first.T
Fill in the blanks
- Travsersal is the process of visiting every node in a tree atleast once.
- In postorder traversal, the root node is visited last.
Chapter 2
A. Points To Ponder
State True or False
- All nodes in a list point to some other node.F
- There is no head in circular node.T
Fill in the blanks
- 2 pointers are used to traverse a doubly linked list.
- New nodes are added at the end of the list.
B. Points To Ponder
State True or False
- A Stack is a data structure in which insertions and deletions are restricted to one end.T
- A Stack uses only one pointer.F
Fill in the blanks
- A Stack, in other words, is called a LIFO list.
- Items are inserted at the top of the stack.
C. Points To Ponder
State True or False
- The representation of queues in C is similar to that of stacks.T
- In a queue, elements are both inserted and deleted from one end.F
Fill in the blanks
- A queue, in other words, is called a FIFO list.
- A multi-tasking system is a good real life example for a queue.
Chapter 3
A. Points To Ponder
State True or False
- The specially designated node is called the root.T
- In a tree diagram, a circle represents nodes.T
Fill in the blanks
- Children of the same parent are called siblings.
- Nodes which are subtrees of another node are called children.
B. Points To Ponder
State True or False
- In a Binary Tree, a node may have a degree greater than 2.F
- In a Binary Search Tree, the left and right sub trees of a node are also binary search trees.T
Fill in the blanks
- In Binary Search Trees, the keys of all elements are unique.
- If a node is a terminal node, then its left child and right child field are filled with NULL.
Chapter 4
A. Points To Ponder
State True or False
- AVL Ttrees are variations of Binary Search Trees.T
- Searching is more efficient in Binary Search Trees than in AVL Trees.F
Fill in the blanks
- The process where two rotations are required to balance a tree is called double rotation.
- When the height of the left subtree and right subtree of a node in an AVL Tree are equal the balancing factor is 0.
B. Points To Ponder
State True or False
- A node of n children should have n values.F
- Searching is more efficient in B-trees than in Binary Search Trees.T
Fill in the blanks
- The values in the left most child of a node must be smaller than the first value of that node.
- The B-tree is derived from multiway search trees.
Chapter 5
A. Points To Ponder
State True or False
- A tree can represent many-to-many relationships.F
- Acyclic graphs do not have cycles.T
Fill in the blanks
- The Out-degree of a vertex is the number of edges this vertex has that are connected to other vertices.
- The weight or value of an edge is also called cost.
B. Points To Ponder
State True or False
- Traversal in a graph is visiting each node atleast once.F
- In DFS, all the nodes adjacent to the current node are visited.F
Fill in the blanks
- In BFS the shortest path can be found.
- The vertex is deleted from the queue when it is visited.
C. Points To Ponder
State True or False
- In the Shortest Path Problem, the distance of other nodes are recomputed when the current node is added to the tree.T
- In Dijkstra's Algorithm a minimal spanning tree can be constructed considering any vertex as the initial vertex.F
Fill in the blanks
- In the Shortest Path Problem when a node is visited, it is deleted from the edge list.
- In Dijkstra's algorithm, a sorted array of edges is required in order to construct a minimal spanning tree.
Chapter 6
A. Points To Ponder
State True or False
- Sorting is always performed on the elements stored in primary memory.F
- Minimal storage sorts are optimal for arrays having a large number of elements.T
Fill in the blanks
- The process of sorting a list stored in a file in secondary memory is known as external sorting.
- Methods that are not Data Sensitive require the same time to sort an array.
B. Points To Ponder
State True or False
- The sort is performed according to the key value of each record.T
- Bubble Sort is so named because it bubbles the smallest element to the middle of the array.F
- The Quick Sort Algorithm works by partitioning the array to be sorted, then recursively sorting each partition.T
Fill in the blanks
- The Shuttle Sort requires n-1 passes to perform the sort.
- In a heap data structure, the largest element is placed in the root of the heap.
- The Insertion Sort method is optimal because the sorted array is developed without using any extra storage space.
Chapter 7
A. Points To Ponder
State True or False
- The Sequential Search method on sorted lists is faster than the indexed method.F
- The search technique which loads only a part of the database into main memory is know as external search.T
Fill in the blanks
- An internal key is maintained at a specific distance from the start of the record.
- In a table of records, if there is no relation between the records, the then table is said to be unsorted.
B. Points To Ponder
State True or False
- A Binary Search can only be applied to sorted records. T
- In Binary Search, when the key is less than the middle element in a sorted array, the higher limit is modified for the next iteration. T
Fill in the blanks
- Binary Search is the fasted of all methods for sorted records.
- The lower limit is modified when the key is greater than the middle element in the array in a binary search method.
C. Points To Ponder
State True or False
- In the Folding method, the key is squared to generate the hash value.F
- Primary clustering occurs in the Double Hashing method.F
Fill in the blanks
- In the Folding Method the key is separated into different groups to generate the hash value.
- If the next empty location is found in a squared number sequence, then it is called quadratic probing.