Skip to content

Instantly share code, notes, and snippets.

@mding5692
Last active March 12, 2020 23:36
Show Gist options
  • Save mding5692/b749d4456efcab49c058b7693ed79a21 to your computer and use it in GitHub Desktop.
Save mding5692/b749d4456efcab49c058b7693ed79a21 to your computer and use it in GitHub Desktop.
This will make it easier to read
Node newNode = new Node(yourString);
if (table[hashLocation] == null ) {
table[hashLocation] = newNode;
} else {
// iterate through nodes
currNode = table[hashLocation];
while (currNode.next != null ) {
currNode = currNode.next;
}
currNode.next = newNode;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment