Doubt in getAt fuction in linked list

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
???

hey @harsh.hj
We create 1 based indexing linkedlist,
you can create 0 based indexing