Data Structures Practice Questions

Chapter 1

A. Points To Ponder

State True or False
  1. Structured data types include operations performed on data types. F
  2. One disadvantage of the hash algorithm is inefficient memory usage. T
Fill in the blanks
  1. A data structure is a logical method of representing data in memory.
  2. In the binary tree algorithm, the deletion procedure is complex.

B. Points To Ponder

State True or False
  1. A program can always be terminated.F
  2. The complexities are ADDED for nested loops.F
Fill in the blanks
  1. Space Complexity refers to the amount of storage the algorithm consumes
  2. The assertion given in the beginning segment in an algorithm is called a precondition.

C. Points To Ponder

State True or False
  1. When an element needs to be removed from the stack, the pop operation is performed.T
  2. In a preorder traversal, the root node is visited first.T
Fill in the blanks
  1. Travsersal is the process of visiting every node in a tree atleast once.
  2. In postorder traversal, the root node is visited last.

Chapter 2

A. Points To Ponder

State True or False
  1. All nodes in a list point to some other node.F
  2. There is no head in circular node.T
Fill in the blanks
  1. 2 pointers are used to traverse a doubly linked list.
  2. New nodes are added at the end of the list.

B. Points To Ponder

State True or False
  1. A Stack is a data structure in which insertions and deletions are restricted to one end.T
  2. A Stack uses only one pointer.F
Fill in the blanks
  1. A Stack, in other words, is called a LIFO list.
  2. Items are inserted at the top of the stack.

C. Points To Ponder

State True or False
  1. The representation of queues in C is similar to that of stacks.T
  2. In a queue, elements are both inserted and deleted from one end.F
Fill in the blanks
  1. A queue, in other words, is called a FIFO list.
  2. A multi-tasking system is a good real life example for a queue.

Chapter 3

A. Points To Ponder

State True or False
  1. The specially designated node is called the root.T
  2. In a tree diagram, a circle represents nodes.T
Fill in the blanks
  1. Children of the same parent are called siblings.
  2. Nodes which are subtrees of another node are called children.

B. Points To Ponder

State True or False
  1. In a Binary Tree, a node may have a degree greater than 2.F
  2. In a Binary Search Tree, the left and right sub trees of a node are also binary search trees.T
Fill in the blanks
  1. In Binary Search Trees, the keys of all elements are unique.
  2. 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
  1. AVL Ttrees are variations of Binary Search Trees.T
  2. Searching is more efficient in Binary Search Trees than in AVL Trees.F
Fill in the blanks
  1. The process where two rotations are required to balance a tree is called double rotation.
  2. 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
  1. A node of n children should have n values.F
  2. Searching is more efficient in B-trees than in Binary Search Trees.T
Fill in the blanks
  1. The values in the left most child of a node must be smaller than the first value of that node.
  2. The B-tree is derived from multiway search trees.

Chapter 5

A. Points To Ponder

State True or False
  1. A tree can represent many-to-many relationships.F
  2. Acyclic graphs do not have cycles.T
Fill in the blanks
  1. The Out-degree of a vertex is the number of edges this vertex has that are connected to other vertices.
  2. The weight or value of an edge is also called cost.

B. Points To Ponder

State True or False
  1. Traversal in a graph is visiting each node atleast once.F
  2. In DFS, all the nodes adjacent to the current node are visited.F
Fill in the blanks
  1. In BFS the shortest path can be found.
  2. The vertex is deleted from the queue when it is visited.

C. Points To Ponder

State True or False
  1. In the Shortest Path Problem, the distance of other nodes are recomputed when the current node is added to the tree.T
  2. In Dijkstra's Algorithm a minimal spanning tree can be constructed considering any vertex as the initial vertex.F
Fill in the blanks
  1. In the Shortest Path Problem when a node is visited, it is deleted from the edge list.
  2. 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
  1. Sorting is always performed on the elements stored in primary memory.F
  2. Minimal storage sorts are optimal for arrays having a large number of elements.T
Fill in the blanks
  1. The process of sorting a list stored in a file in secondary memory is known as external sorting.
  2. Methods that are not Data Sensitive require the same time to sort an array.

B. Points To Ponder

State True or False
  1. The sort is performed according to the key value of each record.T
  2. Bubble Sort is so named because it bubbles the smallest element to the middle of the array.F
  3. The Quick Sort Algorithm works by partitioning the array to be sorted, then recursively sorting each partition.T
Fill in the blanks
  1. The Shuttle Sort requires n-1 passes to perform the sort.
  2. In a heap data structure, the largest element is placed in the root of the heap.
  3. 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
  1. The Sequential Search method on sorted lists is faster than the indexed method.F
  2. The search technique which loads only a part of the database into main memory is know as external search.T
Fill in the blanks
  1. An internal key is maintained at a specific distance from the start of the record.
  2. 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
  1. A Binary Search can only be applied to sorted records. T
  2. 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
  1. Binary Search is the fasted of all methods for sorted records.
  2. 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
  1. In the Folding method, the key is squared to generate the hash value.F
  2. Primary clustering occurs in the Double Hashing method.F
Fill in the blanks
  1. In the Folding Method the key is separated into different groups to generate the hash value.
  2. If the next empty location is found in a squared number sequence, then it is called quadratic probing.