public void reverse(int k) throws Exception{
// Write your code here
int l=0;
int s=k-1;
while(s<this.size){
Node nl = this.getNodeAt(l);
Node ns = this.getNodeAt(s);
int temp = nl.data;
nl.data=ns.data;
ns.data=temp;
l=l+k;
s=s+k;
}
}
is there any problem in the code ...its not working