im learning linked lists in java but am stuck on the following
Before deleting Hobnobs: bourbon, shortbread, Hobnobs, oreos
After deleting Hobnobs: bourbon, shortbread, oreos
i would like to create a delete method that will delete the intermediate node "Hobnobs".
ive got this so far
public class Biscuit {
private BiscuitNode first;
public Biscuit( )
{
this.first=null;
}
public BiscuitNode getFirst() {
return first;
}
public void insert(BiscuitNode first) {
this.first = first;
}
public void deleteFirst()
{
this.first.setSucc(this.first);
}
public void delete(String BiscuitName)
{
the Hobnobs is "BiscuitNode secondLast=new BiscuitNode("Hobnobs", last);
"