Created
October 26, 2015 00:32
-
-
Save Deathnerd/825ce1826bb527902804 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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