Hi Megan, This post is really easy to follow and you have explained it very well. Just one minor mistake in find method:
return current_node if current_node.value == value
should come before
return false if !current_node.next_node
otherwise it will return false even if the value is of the first node i.e head
Why would you want to assume that the head is not the matching value?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Megan, This post is really easy to follow and you have explained it very well. Just one minor mistake in find method:
return current_node if current_node.value == value
should come before
return false if !current_node.next_node
otherwise it will return false even if the value is of the first node i.e head
Why would you want to assume that the head is not the matching value?