Search Header Logo

RMP MCA-22.01.24-searching and sorting-FN

Authored by CCC info@ccc.training

English

Professional Development

Used 1+ times

RMP MCA-22.01.24-searching and sorting-FN
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is correct recurrence for worst case of Binary Search?

T(n) = 2T(n/2) + O(1) and T(1) = T(0) = O(1)
T(n) = T(n-1) + O(1) and T(1) = T(0) = O(1)
T(n) = T(n/2) + O(1) and T(1) = T(0) = O(1)
T(n) = T(n-2) + O(1) and T(1) = T(0) = O(1)

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the time complexity of binary search with iteration?

O(nlogn)
O(logn)
O(n)
O(n2)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are done until the element is found using Binary Search?

1
3
4
2

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given an input arr = {2,5,7,99,899}; key = 899; What is the level of recursion using Binary Search?

5
2
3
4

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the worst case complexity of binary search using recursion?

O(n log n)
O(log n)
O(n)
O(n2)

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a limitation of binary search algorithm?

must use a sorted array
requirement of sorted array is expensive when a lot of insertion and deletions are needed
there must be a mechanism to access middle element directly
binary search algorithm is not efficient when the data elements are more than 1500

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The Average case occurs in linear search algorithm _____________

when item is somewhere in the middle of the array
when item is not the array at all
when item is the last element in the array
Item is the last element in the array or item is not there at all

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?