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

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

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

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)

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

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

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

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)

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

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)

null
null

Buy TCS Prog. Logic (C MCQ) Paid Materials

Join TCS Online Classes