January 2020
Intermediate to advanced
470 pages
11h 13m
English
Let's consider a simple procedure: suppose you have a list and you want to add a new element to it. How would you do this? Here, we can assume that each node is a NodeList object:
class ListNode { constructor(value, next = null) { this.value = value; this.next = next; }}
A possible list would be as follows, where a list variable would point to the first element. Take a look at the following diagram; can you tell what is missing in the list and where?

If you wanted to add D between B and F (the sample list is something musicians will understand: the Circle of Thirds, a musical concept, but missing ...
Read now
Unlock full access