Hello World

This blog is my public learning notebook. I’ll write about: Things I’m learning in development Mistakes I make (and how I fix them) Notes I want to remember later If this helps you, that’s a bonus 🙂

February 10, 2026 · 1 min · Anurag Mishra

The Mathematical Syntax of Binary Search

The Logic Binary search is the quintessential example of logarithmic time complexity. Instead of searching linearly, we divide the problem space in half at each step. The maximum number of comparisons required is defined by: $$ T(n) = \log_2(n) + 1 $$ The Implementation In JavaScript, we express this formal logic as follows: function binarySearch(arr, target) { let left = 0; let right = arr.length - 1; // Implementation logic... }

February 10, 2026 · 1 min · Anurag Mishra