Selection sort and test data generator for sort problems