Hacker News new | past | comments | ask | show | jobs | submit login

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.




The upperbound = maxint

The total number of items = maxint + 1


Admirably put.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: