Getting the length of an arrayTopFinding an item in an arrayRemoving or recoloring an element

Removing or recoloring an element

With the above code written it is now easy to remove an element from the array or to recolor it. Just use the private methods above. See the on-line code.

As an exercise, write code for removing something from the middle of a list and adding something to the middle of a list. (As well as moving items - in the right order - you must also be sure to update the count of the number of items.)
Getting the length of an arrayTopFinding an item in an arrayRemoving or recoloring an element