2 ms·
I was thinking along the same lines as you, but it turns out you only need two comparisons and one logical operator. barrkel has a thorough explanation here:
by Stratoscope 9y ago
I was thinking along the same lines as you, but it turns out you only need two comparisons and one logical operator.
barrkel has a thorough explanation here:
https://news.ycombinator.com/item?id=14641485 https://news.ycombinator.com/item?id=14641485
Or, as I realized later, it seems helpful to me if I look at it as a practical problem instead of an abstract one:
https://news.ycombinator.com/item?id=14642059 https://news.ycombinator.com/item?id=14642059