Khan.randRange(4, 6) Khan.randRange(0, arr_size-2) llistRemovePRO.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 current position.

To move an element, click on it (to highlight it), then click on the element position in the node where you want it to go. To set the "return" value, click on the element position in the node you want to return (to highlight it), then click on the return value 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 "makenull" button. To change the target of labels, such as "curr" and "tail", click on the label (to highlight it), then click on the node you want it to point to.

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

If "curr" points to the same node as "tail", the default list is a correct answer. Otherwise, the first step could be to remember the value of the "curr" node.

Copy value to "curr" from the node following 'curr'.

If "curr" points to the node proceding tail, sets the "curr" node to point to "null". Label "tail" should point to the current node. Otherwise, the "curr" node should point to the following node of the node it used to point to.