IBPS SO IT Officer Professional Knowledge Quiz – Data Structure – 6

Hello and welcome to exampundit. Here is a set of IBPS SO IT Officer Professional Knowledge Quiz on Data Structure/Compiler Design  for IBPS IT Officer Mains exam 2018.

IBPS SO IT Officer Professional Knowledge

  1. If the sequence of operations – push(1), push(2), pop, push (1), push(2), pop, pop, pol , push(2), pop are preformed on a stack, the sequence of popped out values are ?

(a) 2, 2, 1, 1, 2

(b) 2, 2, 1, 2, 2

(c) 2, 1, 2, 2, 1

(d) 2, 1, 2, 2, 2

(e) None of these

Answer

Option: A

Explanation: The elements are popped from the top of the stack.

 

  1. Queue can be used to implement ?

(a) radix sort

(b) quick sort

(c) recursion

(d) depth first search

(e) None of these

Answer

Option: A

Explanation: A simple version of an LSD radix sort can be achieved using queues as buckets.

 

  1. A machine took 200 sec to sort 200 names, using bubble sort. In 800 sec, it can approximately sort ?

(a) 400 names

(b) 800 names

(c) 750 names

(d) 850 names

(e) None of these

Answer

Option: A

Explanation:

For sorting 200 names bubble sort makes 200 × 199/2 = 19900 comparisons. The time needed for 1 comparison is 200 sec. In 800 sec it can make 80,000 comparisons. We have to fine n, such that n(n – 1)/2 = 80,000. From this n is approximately 400.

 

  1. A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximately ?

(a) 50.2 sec

(b) 6.7 sec

(c) 72.7 sec

(d) 11.2 sec

(e) None of these

Answer

Option: B

Explanation:

In the best case quick sort algorithm makes n log(n) comparisons so 1000 x log (1000) = 9000 comparisons, which takes 100 sec. To sort 100 names a minimum of 100 log (100) = 600 comparisons are needed. This takes 100 x 600/9000 = 6.7 sec.

 

  1. The number of binary trees with 3 nodes which when traversed in post order gives the sequence A,B, C is ?

(a) 3

(b) 9

(c) 7

(d) 5

(e) None of these

Answer

Option: D

Explanation: Five trees are

 

 

 

  1. The average search time of hashing with linear probing will be less if the load factor ?

(a) is far less than one

(b) equals one

(c) is far greater than one

(d) All of the above

(e) None of these

Answer

Option: A

Explanation:

Load factor is the ratio number of records that are currently present and the total number of records that can be present. If the load factor is less free space will be more. This means probability of collision is less. So the search time will be less.

 

  1. A binary tree that has n leaf nodes. The number of nodes of degree 2 in this tree is ?

(a) log2n

(b) n – 1

(c) n

(d) 2n

(e) None of these

Answer

Option: B

Explanation:

It can be proved by induction that a binary tree with n leaf nodes will have total of 2n – 1 nodes. So number of non-leaf nodes is (2n – 1) – n = n – 1

 

  1. As part of maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be ?

(a) Bubble sort

(b) Insertion sort

(c) Selection sort

(d) Heap sort

(e) None of these

Answer

Option: B

 

  1. The way a card game player arranges his cards as he picks them up one by one, is an example of ?

(a) bubble sort

(b) selection sort

(c) insertion sort

(d) merge sort

(e) None of these

Answer

Option: C

Explanation:

He scans through the rest of the cards and pick the one with least value and places it next to the point till which he has already sorted the cards.

 

 

  1. The average successful search time for sequential search on ‘n’ items is ?

(a) n/2

(b) (n – 1)/2

(c) (n + 2)/2

(d) log(n) + 1

(e) None of these

Answer

Option: C

 

View other quizzes from here.

 

Average rating / 5. Vote count: