Profile picture of Tushar Verma
Tushar Verma
Advanced application engineering analyst @Accenture l Ex-Full-stack Developer @Automation Agency India |1600+ Leetcode | Freelance Web Developer | AI for Businesses | Qualified Google Codejam
Follow me
Generated by linktime
November 12, 2025
๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก โ€” ๐Œ๐จ๐ซ๐ž ๐“๐ก๐š๐ง ๐‰๐ฎ๐ฌ๐ญ ๐Œ๐ข๐๐๐ฅ๐ž ๐ˆ๐ง๐๐ž๐ฑ๐ž๐ฌ When I first began exploring Binary Search, I thought it was a simple algorithm โ€” find the middle, adjust ๐˜ญ๐˜ฐ๐˜ธ and ๐˜ฉ๐˜ช๐˜จ๐˜ฉ, and repeat until done. But as I started solving more problems, I realized something deeper: ๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก ๐ข๐ฌ๐งโ€™๐ญ ๐ฃ๐ฎ๐ฌ๐ญ ๐š๐ง ๐š๐ฅ๐ ๐จ๐ซ๐ข๐ญ๐ก๐ฆ โ€” ๐ข๐ญโ€™๐ฌ ๐š ๐ฆ๐ข๐ง๐๐ฌ๐ž๐ญ. It teaches how to ๐ง๐š๐ซ๐ซ๐จ๐ฐ ๐ฎ๐ง๐œ๐ž๐ซ๐ญ๐š๐ข๐ง๐ญ๐ฒ, ๐š๐ง๐š๐ฅ๐ฒ๐ณ๐ž ๐›๐จ๐ฎ๐ง๐๐š๐ซ๐ข๐ž๐ฌ, ๐š๐ง๐ ๐ญ๐ก๐ข๐ง๐ค ๐ข๐ง ๐ก๐š๐ฅ๐ฏ๐ž๐ฌ rather than wholes. Over the last few weeks, I explored several patterns of Binary Search โ€” each bringing its own twist, confusion, and โ€œaha!โ€ moment: 1. ๐‚๐ฅ๐š๐ฌ๐ฌ๐ข๐œ ๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก: Finding a target in a sorted array โ€” the purest form. This pattern builds the base for all other variations. 2. ๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก ๐จ๐ง ๐€๐ง๐ฌ๐ฐ๐ž๐ซ: Used when the array isnโ€™t sorted, but the ๐š๐ง๐ฌ๐ฐ๐ž๐ซ ๐ซ๐š๐ง๐ ๐ž ๐ข๐ฌ. Problems like โ€œCapacity to ship packages in D daysโ€ or โ€œFind smallest divisor under a thresholdโ€ donโ€™t need sorted data โ€” they need a ๐˜ด๐˜ฆ๐˜ข๐˜ณ๐˜ค๐˜ฉ ๐˜ฐ๐˜ท๐˜ฆ๐˜ณ ๐˜ญ๐˜ฐ๐˜จ๐˜ช๐˜ค, not over array elements. It reshaped how I think about optimization and feasibility checks. 3. ๐๐จ๐ฎ๐ง๐๐š๐ซ๐ฒ ๐๐ซ๐จ๐›๐ฅ๐ž๐ฆ๐ฌ: Finding the ๐Ÿ๐ข๐ซ๐ฌ๐ญ or ๐ฅ๐š๐ฌ๐ญ occurrence of an element. This looks simple until you realize how mid condition placement and < vs <= make or break your logic. These taught me precision, patience, and how to control loop boundaries. 4. ๐๐ž๐š๐ค / ๐๐ข๐ฏ๐จ๐ญ ๐๐ซ๐จ๐›๐ฅ๐ž๐ฆ๐ฌ: Like searching in a rotated array or mountain array โ€” here, you donโ€™t just look for a number, you look for the point where direction changes. These problems strengthen your ๐ฉ๐š๐ญ๐ญ๐ž๐ซ๐ง ๐ซ๐ž๐œ๐จ๐ ๐ง๐ข๐ญ๐ข๐จ๐ง and push you to visualize array behavior beyond indexes. 5. ๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก ๐๐ž๐ฒ๐จ๐ง๐ 1๐ƒ: Even in 2D arrays, infinite arrays, or implicit search spaces โ€” Binary Search appears again and again. It reminded me that ๐ฌ๐ž๐š๐ซ๐œ๐ก ๐ฌ๐ฉ๐š๐œ๐ž ๐ข๐ฌ ๐ง๐จ๐ญ ๐š๐ฅ๐ฐ๐š๐ฒ๐ฌ ๐ฏ๐ข๐ฌ๐ข๐›๐ฅ๐ž, sometimes you just define it logically. Each of these problems deepened my understanding โ€” not only of algorithms but of how analytical thinking evolves through practice. Every wrong mid-point, every off-by-one mistake, and every successful dry-run became a small teacher โ€” guiding me toward clarity. This phase of my DSA journey reaffirmed something simple yet powerful: ๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก ๐๐จ๐ž๐ฌ๐งโ€™๐ญ ๐ฃ๐ฎ๐ฌ๐ญ ๐Ÿ๐ข๐ง๐ ๐š๐ง๐ฌ๐ฐ๐ž๐ซ๐ฌ, ๐ข๐ญ ๐ก๐š๐ฅ๐ฏ๐ž๐ฌ ๐œ๐จ๐ง๐Ÿ๐ฎ๐ฌ๐ข๐จ๐ง.
Stay updated
Subscribe to receive my future LinkedIn posts in your mailbox.

By clicking "Subscribe", you agree to receive emails from linktime.co.
You can unsubscribe at any time.

November 12, 2025