bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:6:24: error: 'class std::vector<int>' has no member named 'length'
6 | for (int i = 0; i < X.length(); i++) {
| ^~~~~~
bubblesort2.cpp:7:5: error: 'x' was not declared in this scope
7 | A[x[i]] = V[i];
| ^
bubblesort2.cpp:9:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | for (int j = 0; j < A.size(); j++) {
| ~~^~~~~~~~~~