You are viewing a single comment's thread. Return to all comments →
simple answer :)
int GetNode(Node head,int n) {
Node cu = head ; Node pu = head; int p =0; while (cu != null){ cu = cu.next; p++; } while (p-n>1){ pu = pu.next; p--; } return pu.data ;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Get Node Value
You are viewing a single comment's thread. Return to all comments →
simple answer :)
int GetNode(Node head,int n) {
}