Sorter constructor takes input Array