Khan.randRange(4, 8) SelfOrgCounterPro.initJSAV(arr_size) SelfOrgCounterPro.getSearch()

Your task in this exercise is to show the behavior for self organizing lists using the Counter. You will need to demonstrate what happens when you search for the value search_value. You will need to manually redirect the pointers of the nodes to demonstrate what happens when a node that is being searched for is found. In addition, you will need to correctly increment the counter in order to get the correct answer.

Make sure you do increment the counter first, before you do anything else. To increment the counter click on the according node and press on the increase count button. To change a pointer, click on its grey box (on the right side of the node) to highlight it, then click on the node that you want it to point to.

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

You want to reproduce the behavior of the self organizing list's counter method. Start by finding the searched value in the list.

Increase the counter for that node.

Now you need to make it point to the correct node, and make the rest of the nodes point to the other acconrding nodes.