Build a SortedArray class which keeps itself sorted as you add elements.