Please check what is wrong in the code
Hello @garganshul151,
Mistakes:
-
void buildHeapOptimized(vector<int> &heap[][]){
Explanation:
You are passing an array and accepting a vector. -
void heapSort(vector &arr[][]){
Same issue is with this.
Correct it.
now also error is coming
Hello @garganshul151,
-
You are passing heap as an integer variable.
You have to pass an array:
void downHeapifyHelper(int&heap,int idx,int heapSize){ -
void buildHeapOptimized(int &heap[][]){
This is not how you pass the 2D arrays.
You have to specify the number of columns. -
void heapSort(int &arr[][]){
Same mistake.
It seems like if your basics are not clear.
I would suggest you to revise the section of your course that explains array as a parameter to the function.