What you'll learn
- Linear and binary search
- Bubble, selection, insertion sort
- Merge sort and quick sort
- Binary search on answers
A quick example
example
def binary_search(a, x):
lo, hi = 0, len(a) - 1
while lo <= hi:
mid = (lo + hi) // 2
if a[mid] == x: return mid
if a[mid] < x: lo = mid + 1
else: hi = mid - 1
return -1In the live class, the instructor builds examples like this step by step, explains each line and gives practice problems.
How this topic is taught at CodeMBS
Live class
Concept explanation, demonstrations and live problem-solving with the instructor.
Saturday doubts
Bring questions from Searching & Sorting to the weekly doubt-solving session.
Sunday test
Check your understanding with a scheduled assessment.
Recording
Revise the full lesson anytime during your membership.
Full lesson on Searching & Sorting is available to members
Detailed live lesson, worked examples, practice questions, recordings and weekly tests are part of the CodeMBS membership.
Unlock with membership