A Common-Sense Guide to Data Structures and Algorithms, Second Edition: Exercise 4 improvement (page 111).


There is a way to avoid unnecessary step in exercise 4 on page 111 (ch. 7).

Since you already calculating for the array indexes 0/1/2 at the beginning of the code then instead of “i = 0” it might be better to use “i = 1”, is not it?