G10 CS Binary Search

G10 CS Binary Search

12th Grade

10 Qs

quiz-placeholder

Similar activities

Understanding Internet Protocol

Understanding Internet Protocol

KG - University

10 Qs

Google Aptitude Test

Google Aptitude Test

KG - University

10 Qs

Linux: Users and Groups

Linux: Users and Groups

9th Grade - University

14 Qs

Les variables sous Python

Les variables sous Python

10th - 12th Grade

10 Qs

tik kelas 7

tik kelas 7

1st Grade - University

15 Qs

U1L2 Gossip Review

U1L2 Gossip Review

9th - 12th Grade

10 Qs

Code.org Lesson 1-14

Code.org Lesson 1-14

9th - 12th Grade

15 Qs

Files and Management

Files and Management

9th - 12th Grade

10 Qs

G10 CS Binary Search

G10 CS Binary Search

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Fritz Bansag

Used 12+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In which of the following cases a Binary Search algorithm is used?

To search an element in an unordered list?

To search an element in a list of few elements

To search an element in any ordered list with large number of elements

None of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does a binary algorithm works?

Dividing the list into halves until the item is matched with one in the list.

Starts with the first element and checks the next element consecutively until a match is found.

Dividing the total number of elements and sorting them

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

An array with 32 elements is input to a binary search algorithm. How many maximum number of comparisons are performed?

32

16

8

5

3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is the midpoint of the list is calculated in Binary Search algorithm?

midpoint = round ((first_element+last_element)/2)

midpoint =(lower_bound+upper_bound)/2

midpoint = round ((lower_bound+upper_bound)/2)

midpoint = round ((lower_bound+upper_bound))

None of the choices

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Under which of the following conditions a Binary Search algorithm terminates?

(a) Item_found=true

(b) lower_bound <= upper_bound

(c) lower_bound > upper_bound

a or c choices

b or c choices

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Complete the sentence:

The lower half of the list is discarded if the value at midpoint is …………………….. item searched in a Binary Search algorithm.

less than

greater than

equal to

not equal to

none

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Binary Search algorithm, the upper half of the list is discarded if the value at midpoint is greater than item searched.

TRUE

FALSE

None of them

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?