# InfyTQ Algorithms Quiz 1

Question 1 Time: 00:00:00
In ordered linear search what are the best case and worst case complexity? O(nlogn), O(logn)

O(nlogn), O(logn)

O(logn), O(nlogn)

O(logn), O(nlogn)

O(n), O(1)

O(n), O(1)

O(1), O(n)

O(1), O(n)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2 Time: 00:00:00
From the given statements which one is a disadvantage of linear search? Requires more space

Requires more space

Greater time complexities compared to other searching algorithms

Greater time complexities compared to other searching algorithms

Not easy to understand

Not easy to understand

Not easy to implement

Not easy to implement

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3 Time: 00:00:00
Speed difference execution of linear search(recursive) vs linear search(iterative)? Both execute at the same speed

Both execute at the same speed

Linear search(recursive) is faster

Linear search(recursive) is faster

Linear search(Iterative) is faster

Linear search(Iterative) is faster

Can't be said

Can't be said

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4 Time: 00:00:00
From the given following statements which one is not the application of binary search? To find the lower/upper bound in an ordered sequence

To find the lower/upper bound in an ordered sequence

Union of intervals

Union of intervals

Debugging

Debugging

To search in an unordered list

To search in an unordered list

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5 Time: 00:00:00
In bubble sort and selection sort the number of iterations in the given array is arr = {3,4,5,2,1} will be: 5 and 4

5 and 4

4 and 5

4 and 5

2 and 4

2 and 4

2 and 5

2 and 5

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6 Time: 00:00:00
External sorting algorithm? The algorithm that uses tape or disk during the sort

The algorithm that uses tape or disk during the sort

The algorithm that uses main memory during the sort

The algorithm that uses main memory during the sort

The algorithm that involves swapping

The algorithm that involves swapping

The algorithm that is considered ‘in place’

The algorithm that is considered ‘in place’

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7 Time: 00:00:00
Find the suitable modulo value for the given pattern of the length-5 window. 13

13

14

14

12

12

11

11

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8 Time: 00:00:00
True regarding Euclid’s algorithm is that it calculates GCD of two numbers

GCD of two numbers

GCD of more than three numbers

GCD of more than three numbers

LCM of two numbers

LCM of two numbers

LCM of more than two numbers

LCM of more than two numbers

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9 Time: 00:00:00
Choose the correct recurrence relation used in Strassen’s algorithm is: 7T(n/2) + Theta(n^2)

7T(n/2) + Theta(n^2)

8T(n/2) + Theta(n^2)

8T(n/2) + Theta(n^2)

7T(n/2) + O(n^2)

7T(n/2) + O(n^2)

8T(n/2) + O(n^2)

8T(n/2) + O(n^2)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10 Time: 00:00:00
correct formula to generate random numbers between range(lower, upper) using rand() function: rand() % (upper – lower)

rand() % (upper – lower)

rand() + lower

rand() + lower

(rand()%(upper-lower)) + lower

(rand()%(upper-lower)) + lower

(rand()%(upper-lower+1)) + lower

(rand()%(upper-lower+1)) + lower

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"] Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%