Hacker News new | ask | show | jobs
by jongraehl 6141 days ago
For fixed size ints, no rule for mapping pairs of ints to a range of consecutive ints can allow both the empty range and the range of maximal size, e.g. you can't have both "", the empty range, and "0,...,Maxint".

You really need to give up one of the possibilities, or use an extra bit.

2 comments

The upperbound = maxint

The total number of items = maxint + 1

Admirably put.