Perhaps... depending on how big the deck of cards is. So to write this method I would start off with a loop that compares the data to the argument... and then what?
Type: Posts; User: EDale
Perhaps... depending on how big the deck of cards is. So to write this method I would start off with a loop that compares the data to the argument... and then what?
So then if you go through the deck of cards and look at each card one by one, you wouldn't know which is the last one until you go through the whole deck. Would you then have to go through the deck...
Great, it worked, thank you.
Well to find the suit of that last queen... every deck of cards should only have 4 queens, so you just look for the 4th queen and return the suit. So does this mean...
Right, it shows the error at the "i" in the line if(this.equals(getNode(i))). I'm trying to compare the argument to the node at index i. Could you show me how I can do this properly to correct the...
So for the error, it tells me "i cannot be resolved to a variable."
Perhaps you didn't understand my question. For the removeLastOccurence method, the program needs to skip over the first and...
Okay well I did a little research and I think I've created the first two methods roughly. So lets start with the first two. Here is my code:
public E remove(int index) {
Node<E> temp =...
I want to create 4 methods for my singly linked list class: public boolean removeFirstOccurence(Object o), public boolean removeLastOccurence(Object o), public int indexOf(Object o), public int...