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

It's intuitive to me that the option "c) 2 ≤ i ≤ 12" is the only acceptable answer, since it is the only range you can tell immediately at a glance what numbers are included: 2, ..., 12. There shouldn't be a 1 or a 13 in the notation if there won't be a 1 or a 13 in the sequence it's describing -- it's just bad design.

If you select the option "c) 2 ≤ i ≤ 12", then Dijkstra's subsequent argument for zero-indexing becomes an argument for one-indexing, because a sequence of length N yields the range 1 <= i <= N when subscripting with 1, but 0 <= i <= N-1 when starting at 0. The latter is uglier than the former.




It's my gut feeling that your preference yields an equivalent amount of ugly N+1.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: