add check function in Sort class in order to check if the sort algorithm is right automatically