Skip to content

Instantly share code, notes, and snippets.

@CanOrhan
Created August 4, 2015 16:10
Show Gist options
  • Save CanOrhan/c47ad1d9082dfd9e1e0b to your computer and use it in GitHub Desktop.
Save CanOrhan/c47ad1d9082dfd9e1e0b to your computer and use it in GitHub Desktop.
public String getIndex(int index) {
LinkedListNode nodeAtIndex = head;
for(int i = 0; i < index; i++){
nodeAtIndex = nodeAtIndex.getNext();
}
return nodeAtIndex.getValue();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment