Slideshow

Monday 25 February 2013


Q.101 The data structure needed to convert a recursion to an iterative procedure is
(A) Queue. (B) Graph.
(C) Stack. (D) Tree.

Ans: (C)
Q.102 A binary tree stored using linked representation can be converted to its mirror image
by traversing it in
(A) Inorder. (B) Preorder.
(C) Postorder. (D) Any order.
Ans: (B)
Ans: (A)
Q.106 To implement Sparse matrix dynamically, the following data structure is used
(A) Trees (B) Graphs
(C) Priority Queues (D) Linked List
Ans: (D)

Q.108 The balance factor for an AVL tree is either
(A) 0,1 or –1 (B) –2,–1 or 0
(C) 0,1 or 2 (D) All the above
Ans: (A)
Q.109 Applications of Linked List are
(A) Simulation , event driven systems
(B) Postfix and prefix manipulations
(C) Dictionary systems, polynomial manipulations
(D) Fixed block storage allocation, garbage collection
Ans: (D)
Q.110 AVL trees have LL, LR, RR, RL rotations to balance the tree to maintain the balance
factor (LR : Insert node in Right sub tree of Left sub tree of node A, etc). Among
rotations the following are single and double rotations
(A) LL, RL and LR, RR (B) LL, RR and LR, RL
(C) LR, RR and LL, RL (D) LR, RL and LR, RL
Ans: (B)
Q.111 Hashing collision resolution techniques are
(A) Huffman coding, linear hashing (B) Bucket addressing, Huffman coding
(C) Chaining, Huffman coding (D) Chaining, Bucket addressing
Ans: (D)
Q.112 The running time of the following sorting algorithm depends on whether the
partitioning is balanced or unbalanced
(A) Insertion sort (B) Selection sort
(C) Quick sort (D) Merge sort
Ans: (C)
Q.113 Graphs are represented using
(A) Adjacency tree (B) Adjacency linked list
(C) Adjacency graph (D) Adjacency queue
Ans: (B)
Q.114 The average case complexity of Insertion Sort is
(A) O(2n) (B) O(n3)
(C) O(n2) (D) O(2n)
Ans: (C)
Q.115 Infinite recursion leads to
(A) Overflow of run-time stack (B) Underflow of registers usage
(C) Overflow of I/O cycles (D) Underflow of run-time stack
AC05 Programming & Problem Solving Through ‘C’
AC06 Data Structures
20
Ans: (A)
Q.116 The number of unused pointers in a complete binary tree of depth 5 is
(A) 4 (B) 8
(C) 16 (D) 32
Ans: (C)
Q.119 The extra key inserted at the end of the array is called a
(A) End Key (B) Stop Key
(C) Sentinel (D) Transposition
Ans: (C)
Q.120 Which of the following operations is performed more efficiently by doubly linked
list than by singly linked list
(A) Deleting a node whose location is given.
(B) Searching of an unsorted list for a given item.
(C) Inserting a new node after node whose location is given.
(D) Traversing the list to process each node.
Ans: (A)
Q.121 One can determine whether a Binary tree is a Binary Search Tree by traversing it in
(A) Preorder (B) Inorder
(C) Postorder (D) Any of the three orders
Ans: (B)
Q.122 The spanning tree of connected graph with 10 vertices contains
(A) 9 edges (B) 11 edges
(C) 10 edges (D) 9 vertices
AC05 Programming & Problem Solving Through ‘C’
AC06 Data Structures
21
Ans: (A)
Q.123 A sorted file contains 16 items. Using binary search, the maximum number of
comparisons to search for an item in this file is
(A) 15 (B) 8
(C) 1 (D) 4
Ans: (D)
Q.124 One can determine whether an infix expression has balanced parenthesis or not by using
(A) Array (B) Queue
(C) Stack (D) Tree
Ans: (C)
Q.125 The average number of key comparisons done in successful sequential search in a list of
length n is
(A) log n (B) (n-1)/2
(C) n/2 (D) (n+1)/2
Ans: (D)
Q.126 The maximum number of nodes in a binary tree of depth 5 is
(A) 31 (B) 16
(C) 32 (D) 15
Ans: (A)
Q.127 n elements of a Queue are to be reversed using another queue. The number of “ADD”
and “REMOVE” operations required to do so is
(A) 2*n (B) 4*n
(C) n (D) The task cannot be accomplished
Ans: (D)

Q.129 A binary tree can be converted in to its mirror image by traversing it in
(A) Inorder (B) Preorder
(C) Postorder (D) Anyorder
Ans: (B)
Q.130 One can convert an infix expression to a postfix expression using a
(A) stack (B) Queue
(C) Deque (D) none of these

22
Ans: (A)

No comments:

Post a Comment