test broken
28 === 28, right?
0 of 1 Tests Passed
Result | Input | Expected Output | Actual Output | Reason |
---|---|---|---|---|
nthLast([7,14,21,28,35,42], 3) | 28 | 28 | Incorrect Output |
instructions incorrect
Given a singly linked list, return the nth node from last.
The solution returns the value of the node, not the node.
poor consistency
In some singly linkedlist problems, Node has ‘value’, in others, ‘data’.
In some, a class constructor Node is provided, so attribute name is known.
In prior challenge, Find First Intersection, classes and function are missing and one is renamed.
createLinkedList missing
LinkedListNode missing and renamed
insertAtTail missing
display missing