Coding Exercise - How to Merge Two Sorted Array? 编程练习题 - 如何合并两个有序的数组?

Words
275
Reading
2 min
Listen
Play
8y

Task: Merge two given sorted integer array A and B into a new sorted integer array. Example A=[1,2,3,4], B=[2,4,5,6], return [1,2,2,3,4,4,5,6]

XXX: https://helloacm.com/coding-exercise-how-to-merge-two-sorted-array/

Support me and my work as a witness - witness thread by

  1. voting me here, or
  2. voting me as a proxy.

Thank you! Some of My Contributions: SteemIt Tutorials, Robots, Tools and APIs


题意:合并两个已经排序好的数组。这也是合并排序的最后一步操作。还算比较简单的,你可以从数组的两端开始。一般来说从小到大合并会比较直观。

XXX同步到我的博文: https://justyy.com/archives/6417

支持我的工作 支持我成为 见证人

  1. 请在 这里 投我一票, 或者
  2. 设置我 为代理.

谢谢您! 我的贡献:SteemIt 工具、API接口、机器人和教程

股东工具

  1. 成为股东:代理5 SP 即可 (退出股东 输入 0即可)
  2. 查询当前股东

请注意:每次代理都是以最后一次输入的SP数量为标准,比如已经代理10 SP,想多代理5 SP则需要输入 最后的数字 15 SP(而不是 5!)

Coding Exercise - How to Merge Two Sorted Array? 编程练习题 - 如何合并两个有序的数... | Ecency