TCS Searching and Sorting Questions Quiz-1

Question 1

Time: 00:00:00
 The worst case occurred in the linear search algorithm when

The element in the middle of an array

The element in the middle of an array

Item present in the last

Item present in the last

Item present in the starting

Item present in the starting

Item has maximum value

Item has maximum value

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
 What is the average case occur in the linear search when

The element in the middle of an array

The element in the middle of an array

Item present in the last

Item present in the last

Item present in the starting

Item present in the starting

Item has maximum value

Item has maximum value

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

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
 Binary search algorithm can’t be applied to

Pointed array

Pointed array

Sorted binary tree

Sorted binary tree

Unsorted linear array

Unsorted linear array

Sorted linked list

Sorted linked list

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
 Time complexity of a linear search algorithm 

O(log n)

O(log n)

O(n^2)

O(n^2)

O(n)

O(n)

O(n log n)

O(n log n)

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Finding the location of a given element from the collection of item is called as

Searching

Searching

Sorting

Sorting

Mining

Mining

Discovering

Discovering

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Search in which record is checked and read for desired items in file linearly is classified as 

Combinational search

Combinational search

Quadratic search

Quadratic search

Linear research

Linear research

Linear search

Linear search

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
 The number of comparison done by the sequential search is

(N/2)+1

(N/2)+1

(N+1)/2

(N+1)/2

(N+2)/2

(N+2)/2

(N-1)/2

(N-1)/2

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
 What is the complexity of the binary search ?

O(1)

O(1)

O(n)

O(n)

O(log2 N)

O(log2 N)

O(n log n)

O(n log n)

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
which is the following searching  algorithms works on the divide and conquer?

Binary search

Binary search

Linear search

Linear search

Sequential Search

Sequential Search

All of the above

All of the above

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
What is the total number of the comparison done in the binary search

n

n

n^2

n^2

n+1

n+1

log(N+1)

log(N+1)

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!"]

Buy TCS Prog. Logic (C MCQ) Paid Materials

Join TCS Online Classes

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