logo

Crowdly

Browser

Додати до Chrome

TT Module - VII

Шукаєте відповіді та рішення тестів для TT Module - VII? Перегляньте нашу велику колекцію перевірених відповідей для TT Module - VII в training.saveetha.in.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Consider the program

void function(int n) {

int i, j, count=0;

for (i=n/2; i <= n; i++)

for (j = 1; j <= n; j = j*2)

count++;}

The complexity of the program is

0%
0%
0%
0%
Переглянути це питання

What is the time complexity of following code:

int a = 0, i = N;

while (i > 0) 

{

a += i;

i /= 2;

}

0%
100%
0%
0%
Переглянути це питання

The complexity of Fibonacci series is

0%
0%
0%
0%
Переглянути це питання

What is the time complexity of following code:

int a = 0;

for (i = 0; i < N; i++) 

{

for (j = N; j > i; j--) 

{

a = a + i + j;

}

}

0%
100%
0%
0%
Переглянути це питання

What is the time complexity of the below function?

void fun(int n, int arr[]){    int i = 0, j = 0;    for(; i < n; ++i)        while(j < n && arr[i] < arr[j])            j++;}

0%
0%
100%
0%
Переглянути це питання

What is the time complexity of following code:

int a = 0, i = N;

while (i > 0) 

{

a += i;

i /= 2;

}

0%
100%
0%
0%
Переглянути це питання

What is the time complexity of following code:

int i, j, k = 0;

for (i = n / 2; i <= n; i++) 

{

for (j = 2; j <= n; j = j * 2) 

{

k = k + n / 2;

}

}

0%
0%
100%
0%
Переглянути це питання

Suppose we have a ONo time algorithm that finds median of an unsorted array. Now consider a QuickSort implementation where we first find median using the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified QuickSort.

100%
0%
0%
0%
Переглянути це питання

What is the time, space complexity of following code:

int a = 0, b = 0;

for (i = 0; i < N; i++) 

{

a = a + rand();

}

for (j = 0; j < M; j++) 

{

b = b + rand();

}

0%
0%
0%
0%
Переглянути це питання

Give the correct matching for the following pairs:

A. O(log n) 1. Selection sort

B. O(n) 2. Insertion sort

C. O(nlog n) 3. Binary search

D. O(n^2) 4. Merge sort

codes: 

A B C D

a. 3 1 2 4

b. 3 1 4 2

c. 1 3 4 2

d. 1 4 3 2

0%
0%
0%
0%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на training.saveetha.in?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome