Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Linked List Implementation Added. #39

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

soummyaah
Copy link
Contributor

Refs #12 and #4

Please check

  • Team l1ghtsab3r

@aktech
Copy link
Member

aktech commented Apr 9, 2016

Please Fix conflicts.

@soummyaah
Copy link
Contributor Author

@aktech Please review

@@ -0,0 +1,60 @@
import logging
Copy link
Member

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?

@aktech
Copy link
Member

aktech commented Apr 14, 2016

@goelakash
Copy link
Collaborator

goelakash commented May 1, 2016

@soumyyaah Still working on this?

@soummyaah
Copy link
Contributor Author

@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)
Copy link
Contributor Author

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?

@goelakash
Copy link
Collaborator

@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!

@soummyaah
Copy link
Contributor Author

@goelakash Sorry I was busy with some work. That seems like a good idea. I'll implement it in a day or two.
@aktech @CuriousLearner Could you tell me about the tests?

@goelakash
Copy link
Collaborator

goelakash commented May 24, 2016

@soummyaah Yeah, no rush. I think making a generic function that can insert at any position, like:

pos = 0  -> push to head
pos = -1 -> push at the end
pos < n  -> push at position 'pos'

@CuriousLearner
Copy link
Member

Hi @soummyaah !

Are you still on this? Can you please resolve conflicts?

@sahar2012
Copy link

The code does not follow the pep8 format. You may want to run it through http://pep8online.com/ to check the errors

@aktech
Copy link
Member

aktech commented Aug 9, 2016

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.

@rahulroxx
Copy link
Contributor

rahulroxx commented Aug 10, 2016 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants