1. When the target is not in the bag, the first assignment statement to cursor will set it to null. This means that the body of the loop will not execute at all, and the method returns the answer 0.
2. Test the case where you are removing the last element from the bag.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here