紧急情况,请各位帮忙分析支招# Biology - 生物学
h*g
1 楼
Let’s called array1 as A and array2 as B, each with size m and n.
正常的话,O(m+n)应该可以搞定,但是。。。
if n is very very large, the memory can not hold it.
i) What if elements of array B is stored on disk, and the memory is limited
such that you cannot load all elements into the memory at once?
ii) How will the complexity change in this case? Are there any factors you
need to consider?
iii) How do you change your solution to adapt to this situation?
如果用external sort类似的方法,该咋做呢?
正常的话,O(m+n)应该可以搞定,但是。。。
if n is very very large, the memory can not hold it.
i) What if elements of array B is stored on disk, and the memory is limited
such that you cannot load all elements into the memory at once?
ii) How will the complexity change in this case? Are there any factors you
need to consider?
iii) How do you change your solution to adapt to this situation?
如果用external sort类似的方法,该咋做呢?