Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
It will fail in thisthe case 8,-19, 5,8, -19, 5, -4, 20. The-4, 20; the startstartIndex and endIndexendIndex will not update until 20, but the start should be 5;5.
It will fail in this case 8,-19, 5,-4, 20; the start and endIndex will not update until 20, but the start should be 5;
It will fail in the case 8, -19, 5, -4, 20. ThestartIndex and endIndex will not update until 20, but the start should be 5.