Chapter 2. Getting started. isSorted fix.