Skip to content

Add linked-list exercise - #85

Merged
jtigger merged 1 commit into
exercism:masterfrom
counterleft:linked_list_exercise
Jan 7, 2016
Merged

jtigger merged 1 commit into
exercism:masterfrom
counterleft:linked_list_exercise

Conversation

@counterleft

Copy link
Copy Markdown
Contributor

The tests assume that the Deque class is implemented with generics.

The example implementation keeps track of a circular head Element.

Completes one task in #3.

The tests assume that the Deque class is implemented with generics.

The example implementation keeps track of a circular head Element.

Completes one task in exercism#3.
@jtigger jtigger self-assigned this Jan 7, 2016
@jtigger

jtigger commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

Thank you! Looks really good, @winterchord. Thanks for following suit and using AssertJ! Also, this is a great exercise to introduce generics; nice touch.

I'm not sure how strict we want to be with the progression. This should definitely be later in the track as you've placed it. I do notice that in the check list (#3), it's after Pascal's Triangle.

jtigger added a commit that referenced this pull request Jan 7, 2016
@jtigger
jtigger merged commit 3460389 into exercism:master Jan 7, 2016
@counterleft

Copy link
Copy Markdown
Contributor Author

@jtigger Yeah, I wasn't sure exactly where to place it in the progression. I tried to place it relative to where it was in the ruby progression. I didn't even think about using the checklist in #3 as the progression order.

@counterleft
counterleft deleted the linked_list_exercise branch January 7, 2016 18:43

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Element should be generic as well and instead of storing an Object should store an object of type T. Then this cast becomes unnecessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right. I had that in a previous implementation. Don't know why I got rid of it.

@sit

sit commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

I don't know what the other tracks look like, but there should be tests for popping and shifting off an empty Deque.

@counterleft

Copy link
Copy Markdown
Contributor Author

The instructions for the linked-list exercise (https://github.com/exercism/x-common/blob/master/linked-list.md) state the following:

To keep your implementation simple, the tests will not cover error conditions. Specifically: pop or shift will never be called on an empty Deque.

@counterleft

Copy link
Copy Markdown
Contributor Author

I'll create another PR for with the suggested changes and cc you @sit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants