The Joy of Computing using Python Week 5: Assignment 1 | NPTEL | [Jan 2023]

Computer Bits Daily
2 min readFeb 20, 2023

--

The Joy of Computing using Python Week 5: Assignment 1 | NPTEL | [Jan 2023]

The Joy of Computing using Python Week 5 — Assignment 5 | NPTEL | Answer with Explanation

“Discover the Excitement of Computing with Python | Week 5 Multiple Choice Questions — Get ready to enhance your programming skills and deepen your understanding of the Python language with this week 5 MCQ on ‘The Joy of Computing using Python’. Test your knowledge and boost your confidence as a Python programmer today!”

Binary search can be applied on ___.

a. Sorted list
b. Unsorted list
c. Both A and B
d. Any list with any elementsAnswer

a. Sorted list
- Binary search is applied only on the sorted list it can not apply to an unsorted list.
- It is an efficient algorithm for searching for a specific element in a sorted list by repeatedly dividing the search interval in half until the element is found or determined to be not in the list.
- If the list is unsorted, binary search cannot be applied, as the algorithm relies on the fact that the list is already sorted to divide the search interval in half.
- For an unsorted list, a different search algorithm like linear search is typically used.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Computer Bits Daily
Computer Bits Daily

Written by Computer Bits Daily

Learning Computer skills and Computer technology by learning and sharing

No responses yet

Write a response