Data Structures :: Complexity

NA
SHSTTON
74
Solv. Corr.
75
Solv. In. Corr.
149
Attempted
0 M:10 S
Avg. Time

1 / 48

Choose the correct option.

The complexity of searching an element from a set of n elements using Binary search algorithm is


AO(n)

BO(log n)

CO(n^2)

DO(n log n)

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
165
Solv. Corr.
42
Solv. In. Corr.
207
Attempted
0 M:7 S
Avg. Time

2 / 48

Choose the correct option.

Two main measures for the efficiency of an algorithm are


ATime and space

BProcessor and memory

CComplexity and capacity

DData and space

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
85
Solv. Corr.
113
Solv. In. Corr.
198
Attempted
0 M:9 S
Avg. Time

3 / 48

Choose the correct option.

If the array is already sorted, then the running time for merge sort is: ?


AO(1)

BO(n*log n)

CO(n)

DO(n^2)

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
84
Solv. Corr.
107
Solv. In. Corr.
191
Attempted
0 M:0 S
Avg. Time

4 / 48

Choose the correct option.

Which is the best data structure for round robin algorithm for CPU scheduling?


AStack implemented using queues

BDoubly linked list

CCircular queue

DQueue implemented using stacks

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
70
Solv. Corr.
119
Solv. In. Corr.
189
Attempted
0 M:0 S
Avg. Time

5 / 48

Choose the correct option.

Which algorithm is having highest space complexity?


ABubble sort

BInsertion Sort

CQuick Sort

DMerge Sort

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
54
Solv. Corr.
109
Solv. In. Corr.
163
Attempted
0 M:0 S
Avg. Time

6 / 48

Choose the correct option.

quicksort algorithm is used to sort an array of N elements. If all the N values w
complexity of quicksort that uses first element as the pivot. ?


AO(N*N)

BO(1)

CO(N)

DO(N log N)

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
68
Solv. Corr.
87
Solv. In. Corr.
155
Attempted
0 M:11 S
Avg. Time

7 / 48

Choose the correct option.

Algorithms A and B solve the same problem. Time complexity of A is in O(n^2) and that of B is in O(n). Which among the following can you guarantee?


AA is having less executable instructions than B

BA is having more number of functions than B

CA is having less number of functions than B

DA is having more executable instructions than B

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
121
Solv. Corr.
48
Solv. In. Corr.
169
Attempted
0 M:0 S
Avg. Time

8 / 48

Choose the correct option.

The complexity of merge sort algorithm is


AO(n)

BO(log n)

CO(n2)

DO(n log n)

 View Answer |  Discuss in Forum |  Workspace | Asked In Societe Generale |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
130
Solv. Corr.
42
Solv. In. Corr.
172
Attempted
0 M:0 S
Avg. Time

9 / 48

Choose the correct option.

The complexity of linear search algorithm is


AO(n)

BO(log n)

CO(n2)

DO(n log n)

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
78
Solv. Corr.
92
Solv. In. Corr.
170
Attempted
0 M:0 S
Avg. Time

10 / 48

Choose the correct option.

The complexity of Binary search algorithm is


AO(n)

BO(log )

CO(n2)

DO(n log n)

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace