Problem swapsort
User MegaG
Submission Time 2025-11-20 14:50:08
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swapsort.cpp:7:39: error: use of parameter outside function body before ‘]’ token
7 | bool isSorted(int size, int array[size]){
| ^
swapsort.cpp: In function ‘bool isSorted(...)’:
swapsort.cpp:8:19: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<’
8 | for(int i = 1; i < size; i++){
| ~~^~~~~~
swapsort.cpp:9:11: error: expected unqualified-id before ‘[’ token
9 | if(array[i] > array[i - 1]){
| ^