# 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.

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.

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

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

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.

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.

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

Linear research

Linear research

Linear search

Linear search

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

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.

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.

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.

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.

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%

Get over 200+ Courses under One Subscription

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

## One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assurance