Why did we run the iteration till i < arr.length - 2 in Triplet Sum Close to Target (medium) question? Could someone please explain?
for (let i = 0; i < arr.length - 2; i++) { … }
Course: Grokking the Coding Interview: Patterns for Coding Questions - Learn Interactively
Lesson: Triplet Sum Close to Target (medium) - Grokking the Coding Interview: Patterns for Coding Questions