-
Notifications
You must be signed in to change notification settings - Fork 68
problem with the size when trying to delete items #1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Thanks for finding this issue. Can you please explain a bit more what is happening when you try to delete items? Is there any exception? Also if you can raise a pull request for the issue, that will be great. |
My pleasure. As I wanted to show with the code above, when I try to delete all the items, except a last one from the CircularLinkedList g that I created, the g.size() returns an incorrect answer. To be sure, I display the list and there are already items there ! You can execute the main method to get a better understanding of the issue. If there is a chance I may not have fully understood the use of your CircularLinkedList class, please let me know where I missed it. |
I found the issue. In the method deleteFromPosition( ) the size decrementation should be written in the else bloc, like this :
|
`package com.deepak.data.structures.LinkedList;
public class theGame {
}`
The text was updated successfully, but these errors were encountered: