a problem of programming kind of sorting