visualize sorting by scala