π AI-Powered CS Learning Β· 2026
Stop memorising.
Start understanding.
Modern Python, DSA, JavaScript, System Design β with an AI tutor, mock interviews, and a student community. Free forever.
binary_search.pyβ live
def binary_search(arr, target): # O(log n) Β· Ask AI Tutor β¦ l, r = 0, len(arr) - 1 while l <= r: mid = l + (r - l) // 2 if arr[mid] == target: return mid elif arr[mid] < target: l = mid + 1 else: r = mid - 1 return -1
β¦ Everything You Need