You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will help solidify your understanding and then you will have your answer in regard to this PR if it should exist or not.
Note: I have edited your message to provide the context (keeping the link, though) so that no one needs to click out to get the value of the perceived problem.
I eventually got the exercise to pass but there are missing parts (list's head, next element and size).
Regarding the issue I raised:
I when I read the code list.push(first).push(second).push(third) I naturally think that element are going to be inserted at the end of list and not at the beginning as the exercise "expects/forces" the student to do it (and there's nothing wrong with that at all).
I was not aware that one could implement linked list that way, meaning inserting at the beginning UNLESS you add an index to specify it.
Appreciate your feedback, thank you and will ask mentoring.
Hi,
I was working on the simple linked list exercise and I couldn't help to wonder whether this assertion, which reads:
was correct?
In my opinion, when adding an element to the list with the following code:
I should get that :
=> [1, 2, 3]
in other word the assertion should be this:
assert_equal [1, 2, 3], list.to_a
I haven't finished the exercise yet but I'm curious to get your opinion on it. Thank you.
Conversation on the forums located here.
The text was updated successfully, but these errors were encountered: