diff --git "a/\342\234\205 Pattern 06: In-place Reversal of a LinkedList.md" "b/\342\234\205 Pattern 06: In-place Reversal of a LinkedList.md" index 9410030..46e7c7a 100644 --- "a/\342\234\205 Pattern 06: In-place Reversal of a LinkedList.md" +++ "b/\342\234\205 Pattern 06: In-place Reversal of a LinkedList.md" @@ -277,7 +277,8 @@ console.log(`Nodes of reversed LinkedList are: ${reverseEveryKElements(head, 3). The problem follows the in-place Reversal of a LinkedList pattern and is quite similar to Reverse every K-element Sub-list. The only difference is that we have to skip `K` alternating elements. We can follow a similar approach, and in each iteration after reversing `K` elements, we will skip the next `K` elements. -````class Node { +````js +class Node { constructor(value, next = null) { this.value = value this.next = next