Closed iisfaq closed 10 years ago
Great! I guess I implemented those methods, but actually never used...
Do you want to commit it, or want me to doit? You can doit directly in GitHub if you want @iisfaq =)
I do not know how to. I would like to but not sure what to do.
You can even do it from the GitHub, without any command line...
If you want to, you can learn it here:
Or, tell me and I doit from here...
There are 2 bugs in your remove method
Bug 1
This can never work!
For example you have 5 items in a list, and you want to remove the last item.
index =4 for the 5th element in the list.
Your code will never work 4-1 = 3, and comparing 3 to 5 don't work
So you need to change that to
Bug 2
At the end of the method you have this statement
This creates a new instance of T instead of returning the current T for the node you are deleting. Here is my corrected code.
The new corrected code
Chris