Socrates Logo

Master Computer Science through AI-powered Socratic questioning.

Code Editor
def binary_search(arr, target):
    left, right = 0, len(arr) - 1
    
    while left <= right:
        mid = (left + right) // 2
        if arr[mid] == target:
            return mid
        elif arr[mid] < target:
            left = mid + 1
        else:
            right = mid - 1
Visual Canvas
8412
AI Assistant

Let's explore how binary search works. What happens if we search for a number that's not in the array?

_
Scroll to explore features
Socratic Method

Socratic Method

Guided learning through intelligent questioning and systematic discovery

Personalized Learning

Personalized Learning

Adaptive feedback and learning paths tailored to your unique progress

Interactive Coding

Interactive Coding

Real-time code execution and testing in an immersive environment