Skip to content

Instantly share code, notes, and snippets.

@Deathnerd
Created October 26, 2015 00:32
Show Gist options
  • Save Deathnerd/825ce1826bb527902804 to your computer and use it in GitHub Desktop.
Save Deathnerd/825ce1826bb527902804 to your computer and use it in GitHub Desktop.
@Override
public void deleteNode(int key) {
Term current = this.first;
while(current != null){
if(((Term)current.next).getCoefficient() == key){
Term t = (Term) current.next.next;
current.next.next = null;
current.next = t;
} else {
current = (Term) current.next;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment