https://ide.codingblocks/.com/s/165409
why this is not working?
Array target sum tripletss
@guptaaman155
The limits of i, j, k should be:
for(int i=0;i<(N-2);i++){
for(int j=i+1;j<N-1;j++){
for(int k=j+1;k<N;k++){
(i should be till n-2, j till n-1 and k till n because last three elements can also be considered.and j starts from i+1 and k starts from j+1 so max value of i will be n-3(i.e. less than n-2)).
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.