看一本R语言的书,其中有一个问题如下:
Write a program to merge two sorted vectors into a single sorted vector.
Do not use the sort(x) function, and try to make your program as efficient
as possible. That is, try to minimise the number of operations required to
merge the vectors.
能否一起探讨一下有效的算法,我先抛砖引玉,思想来自网络的帖子: