diff --git a/curriculum/challenges/english/10-coding-interview-prep/data-structures/remove-elements-from-a-linked-list.md b/curriculum/challenges/english/10-coding-interview-prep/data-structures/remove-elements-from-a-linked-list.md index d704b698a6..7b6fd45e83 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/data-structures/remove-elements-from-a-linked-list.md +++ b/curriculum/challenges/english/10-coding-interview-prep/data-structures/remove-elements-from-a-linked-list.md @@ -31,7 +31,7 @@ tests: - text: Your remove method should decrease the length of the linked list by one for every node removed. testString: assert((function(){var test = new LinkedList(); test.add("cat"); test.add("dog"); test.add("hamster"); test.remove("cat"); test.remove("fish"); return test.size() === 2})()); - text: Your remove method should reassign the reference of the previous node of the removed node to the removed node's next reference. - testString: assert((function(){var test = new LinkedList(); test.add('cat'); test.add('dog');test.add('kitten'); test.remove('dog'); return test.head().next.element === 'kitten'})()); + testString: assert((function(){var test = new LinkedList(); test.add('cat'); test.add('dog'); test.add('snake'); test.add('kitten'); test.remove('snake'); return test.head().next.next.element === 'kitten'})()); - text: Your remove method should not change the linked list if the element does not exist in the linked list. testString: assert((function(){var test = new LinkedList(); test.add('cat'); test.add('dog');test.add('kitten'); test.remove('elephant'); return JSON.stringify(test.head()) === '{"element":"cat","next":{"element":"dog","next":{"element":"kitten","next":null}}}'})());