3 ms·
Following the principle that array indexes are “between” the elements, the bottom of the first step is 0, and the top of the first step is 1. Then the ground, w
by DougBTX 8y ago
Following the principle that array indexes are “between” the elements, the bottom of the first step is 0, and the top of the first step is 1. Then the ground, which is equal in elevation to the bottom of the first step, is at 0, and the floor after the last step is N, one past the index of the last valid step, N-1.
Half open zero based ranges are quite satisfying :-)