Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
需要合并 4 个排序数组 A、B、C 和 D。允许使用以下任何一种技术:
在比较和转移方面,每种技术的优缺点是什么?
这里有两个效率衡量标准:
一个。内存使用情况。
湾。表现。
第一种技术的内存使用率很低,因为它不产生中间数组。
第三种技术具有高性能,因为 A/B 和 C/D 可以并行合并,然后合并中间数组。
最后,第二种技术没有上述特征。