A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

 61. Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of the linked list). Given the representation, which of the following operation cannot be implemented in O(1) time ? a. Insertion at the front of the linked list b. Insertion at the end of the linked list c. Deletion of the front node of the linked list d. Deletion of the last node of the linked list

 62. Consider an undirected graph G where self-loops are not allowed. The vertex set of G is {(i, j) | 1 ≤ i ≤ 12, 1 ≤ j ≤ 12}. There is an edge between (a, b) and (c, d) if |a – c| ≤ 1 or |b–d| ≤ 1. The number of edges in this graph is a. 726 b. 796 c. 506 d. 616

 63. The runtime for traversing all the nodes of a binary search tree with n nodes and printing them in an order is a. O(lg n) b. O(n lg n) c. O(n) d. O(n^2)

 64. Consider the following statements : S1: A queue can be implemented using two stacks. S2: A stack can be implemented using two queues. Which of the following is correct ? a. S1 is correct and S2 is not correct b. S1 is not correct and S2 is correct c. Both S1 and S2 are correct d. Both S1 and S2 are not correct

 65. Given the following prefix expression: * + 3 + 3 ↑ 3 + 3 3 3 What is the value of the prefix expression? a. 2178 b. 2199 c. 2205 d. 2232

 66. A priority queue is implemented as a max-heap. Initially, it has five elements. The level-order traversal of the heap is as follows: 20, 18, 15, 13, 12 Two new elements ‘10’ and ‘17’ are inserted in the heap in that order. The level-order traversal of the heap after the insertion of the element is: a. 20, 18, 17, 15, 13, 12, 10 b. 20, 18, 17, 12, 13, 10, 15 c. 20, 18, 17, 10, 12, 13, 15 d. 20, 18, 17, 13, 12, 10, 15

 67. If there are n integers to sort, each integer has d digits, and each digit is in the set  {1, 2, …, k}, radix sort can sort the numbers in: a. O (k (n + d)) b. O (d (n + k)) c. O ((n + k) l g d) d. O ((n + d) l g k)