sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:15:12: error: 'i' was not declared in this scope
15 | if(i>=N){i=N-1};
| ^
sorting.cpp:16:9: error: 'else' without a previous 'if'
16 | else{i=c};
| ^~~~
sorting.cpp:16:14: error: 'i' was not declared in this scope
16 | else{i=c};
| ^
sorting.cpp:19:29: error: 'i' was not declared in this scope
19 | if(ns[j] == i){
| ^
sorting.cpp:33:19: error: 'i' was not declared in this scope
33 | first = ((i==1)?0:i);
| ^