Code golf: combining multiple sorted lists into a single sorted list

前端 未结 26 1949
余生分开走
余生分开走 2020-12-29 12:42

Implement an algorithm to merge an arbitrary number of sorted lists into one sorted list. The aim is to create the smallest working programme, in whatever language you like.

26条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-29 13:03

    GNU system scripting (I guess that's cheating, but it is nice to know too).

    sort -m file1 file2 file3 ...
    

提交回复
热议问题