阅读背景:

最有效的算法得到两个有序列表的联合

来源:互联网 

I need to find the union of 2 descending ordered lists (list1 and list2), where the union would be each element from both lists without duplicates. Assume the list elements are integers. I am using big O notation to determine the most efficient algorithm to solve this problem. I know the big O notation for the 1st, but I do not know the big O notation for the 2nd. Can someone tell me the big O notation of the 2nd algorithm so I can decide which algorithm to implement? If someone knows a better algorithm than one of these, could you help me understand that as well? Thanks in advance.I need to find the union of 2 descending ordere




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: