-
Notifications
You must be signed in to change notification settings - Fork 126
Linked List Implementation Added. #39
base: master
Are you sure you want to change the base?
Conversation
Please Fix conflicts. |
@aktech Please review |
@@ -0,0 +1,60 @@ | |||
import logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this?
@soumyyaah Still working on this? |
@goelakash Yes, I had some constraints and was not able to get to it. I'll complete it in a day or two. |
|
||
# Test delete | ||
def step5(self): | ||
self.assertEqual(self.test_list.find(4), self.test_list.head) | ||
assert self.test_list.find(4) == self.test_list.head | ||
self.test_list.delete(4) | ||
self.assertRaises(ValueError, self.test_list.find, 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aktech
I've made the changes required. Removed the imports and changed the way I assert the tests. However, how do you suggest I should change this particular line?
What I'm basically checking here is if 4 was successfully deleted from the list.
Also, could you tell me why you guys are preferring this method instead of assertTrue? Is there any down sides to it? Or is it because you have decided on that convention?
@soummyaah How about adding a function to insert node in the middle of the linked list also? Everything else looks very good. Also, resolve the conflicts and squash the commits. Thanks for the great work! |
@goelakash Sorry I was busy with some work. That seems like a good idea. I'll implement it in a day or two. |
@soummyaah Yeah, no rush. I think making a generic function that can insert at any position, like:
|
Hi @soummyaah ! Are you still on this? Can you please resolve conflicts? |
The code does not follow the pep8 format. You may want to run it through http://pep8online.com/ to check the errors |
It's not a good idea to use an online pep8 checker, that's inconvenient, rather install a plugin for your code editor. |
Afaik, coala-analyzer bears are merged so they should rfc and auto correct
scripts according to pep8 standards.
|
Refs #12 and #4
Please check