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.

Pattern is : 4 3 2 5 0

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/10

Accuracy

0%

Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects

Comments