Khan.randRange(5, 7) Khan.randRange(1, arr_size-2) LinkedListRemovePRO.initJSAV(arr_size, curr_pos)

Your task in this exercise is to show the behavior for Linked list deletion. You must delete the element in the given position.

To move an element value from one node to another, click on it (to highlight it), then click on the element position in the node where you want it to go. Do the same to set the "return" value – click on an element (to highlight it), and then click on the return box to set it to the highlighted value. You can make a node's "next" pointer point to "null" by first clicking the pointer for the node and then clicking the "Make Null" button.

To change a pointer, click on its box (on the right side of the node) to highlight it, then click on the node that you want it to point to. Note that you can you can only assign pointers to nodes that are visible to the algorithm! The visible nodes are new nodes, and the one pointed to by prev, and their successors. To move the prev pointer forward, click the "Move Forward" button.

[LinkedListRemovePRO.userInput]
if (!LinkedListRemovePRO.checkAnswer(arr_size, curr_pos) && !guess[0]) { return ""; // User did not click, and correct answer is not // initial array state } else {return LinkedListRemovePRO.checkAnswer(arr_size, curr_pos);}

Point the prev pointer to the node before the node where you want to insert the value.

Now you can copy the value to delete to the return box.

Finally, you have to redirect the next pointer for the prev.

And don't forget to set the pointer of the node to be deleted to null (for garbage collection).