Changed the tableau to be a sorted array.