Interleaving multiple arrays into a single array

后端 未结 4 879
孤独总比滥情好
孤独总比滥情好 2020-11-27 22:04

I need to merge several arrays into a single array. The best way to describe what I\'m looking for is \"interleaving\" the arrays into a single array.

For example

4条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 22:37

    If you have n arrays, you could use a SortedList, and use arrayIndex * n + arrayNumber as a sort index.

提交回复
热议问题