reduce condition

// Bad
if(target-numbers[L] < numbers[R]){
    R--
 } else {
    L++
 }

// Good
target-numbers[L] < numbers[R] ? R-- : L++

Last updated