> what's the difference between [&, targetNumbers](int i) and [&](int i)
In [&, targetNumbers](int i), targetNumbers is captured by value, everything else (inputNumbers here) is captured by reference.
In [&](int i), everything is captured by reference (both inputNumbers and targetNumbers here).
> Does [&, targetNumbers](int i) pass targetNumbers like const targetNumbers ?
Yes. With [&, targetNumbers](int i) { /*...*/ } the lambda expression is not allowed to modify targetNumbers
With [&, targetNumbers](int i) mutable { /*...*/ } the lambda expression is allowed to modify the copy of targetNumbers that it has captured by value (the modification is on the copy, not the original.)