Currently this method has a run time of O(N^2) and I am trying to get it to O(N). Any suggestion as to where I should start?
public void removeAll(e removeNum)
{
node nodeToFind = this.find(removeNum);
while(nodeToFind != null)
{
this.remove(nodeToFind);
nodeToFind = this.find(removeNum);
}
}
Thanks