node temp=this.head;
for (int i=1;i<=idx;i++) {
temp=temp.next;
}
return temp.data;
why in this code i is starting from 1 not 0
???
node temp=this.head;
for (int i=1;i<=idx;i++) {
temp=temp.next;
}
return temp.data;
why in this code i is starting from 1 not 0
???