Throwing error kindly check

public void reverse(int k){

// Write your code here 
int m = this.size/k;
int initial=0;
    int fin=m-1;
    
for(int i=0;i<k;i++){
   int c=initial;
 int d=fin;
  while(c<d){
      Node left = getNodeAt(c);
  Node right = getNodeAt(d);
      int temp=left.data;
      left.data=right.data;
      right.data=temp;
      c++;
      d--;

       }
   initial=initial+m;
   fin=fin+m;
}


}

Hi Ishant,
You had asked question against wrong content.

And is you have doubt in solving reverse linked list problem just follow the thread: Compile time error kindly check

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.