Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #21001

T

Tyler Hou

Personal blog · blog.tylerhou.io/postsprogrammingmath

Tyler Hou's personal blog at blog.tylerhou.io covers programming and math. Since 2022, 3 different Hacker News readers have linked it 4 times, most often “Binary Search, Revisited”. The last post was in 2024, but the archive is still widely read.

Visit the blog
4mentions?
3HN people?
2022–2022first – last linked?

Too few sampled comments (2) to say how often HN recommends it.?

Why HN links it

HN readers link this blog's binary search post, which discusses the +1/-1 search optimization and whether a true/false invariant keeps the search theoretically pure. A followup post on other problems is also mentioned.

Summarised by Claude from a sample of 2 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

Most-linked posts?

  1. Binary Search, Revisited
    3 people · 3 mentions · first linked 2022-03-07

What Hacker News says?

  1. > That said, you can only use the +1/-1 optimization when you are searching for a particular element, so you can no longer use a function that returns true/false; you need a third state to distinguish equality. So it's also not as theoretically "pure" as I would like. But not only is it less pure, it's also not applicable to other real problems (see the followup post: https://blog.tylerhou.io/posts/binary-search-rev…

    Comment linking /posts/binary-search-revisited/

    on “Binary search with confidence”
  2. Submitted Binary search with confidence as a story · 94 points

    HN discussion
  3. I think you're right that I don't do the "normal" implementation quite enough justice; I've been meaning to write a third followup binary search post to "redeem" it. As others have mentioned, you can prove it correct with a simple invariant: the value that you are looking for is in the narrowed range (if it is in the array to begin with). But I think that invariant is harder to write code for, which is the point of…

    Comment linking /posts/binary-search-revisited/

    on “Binary search with confidence”
  4. Submitted Binary Search, Revisited as a story · 2 points

    HN discussion

Search all of HN for blog.tylerhou.io

Linked by the same people?