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.
function merge(a) { var r=[], p; while(a.length>0) { for (var i=0,j=0; i
Test:
var arr = [[1, 4, 7], [2, 5, 8], [3, 6, 9]]; alert(merge(arr));