Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * TODO: Implement
- */
- public void remove(String str)
- {
- Node node = remove_helper(str, front);
- if (node != null) node = node.next;
- }
- private Node remove_helper(String str, Node node)
- {
- if (node == null) //Returns null pointer when it reaches the end of the list
- {
- return null;
- }
- else if (str.equals(node.key))
- {
- return node;
- }
- else
- {
- return remove_helper(str, node.next);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement