{"id":100779,"date":"2026-09-05T09:57:08","date_gmt":"2026-09-05T01:57:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/100779.html"},"modified":"2026-09-05T09:57:08","modified_gmt":"2026-09-05T01:57:08","slug":"12-%e5%bd%92%e5%b9%b6%e6%8e%92%e5%ba%8f%ef%bc%9a%e5%88%86%e6%b2%bb%e6%80%9d%e6%83%b3%e7%9a%84%e7%a8%b3%e5%ae%9a%e6%8e%92%e5%ba%8f%e7%ae%97%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/100779.html","title":{"rendered":"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5"},"content":{"rendered":"<h3>\u4e00\u3001\u4ec0\u4e48\u662f\u5f52\u5e76\u6392\u5e8f&#xff1f;<\/h3>\n<p>\u5f52\u5e76\u6392\u5e8f&#xff08;Merge Sort&#xff09;\u662f\u4e00\u79cd\u57fa\u4e8e\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5&#xff0c;\u7531 John von Neumann \u5728 1945 \u5e74\u63d0\u51fa\u3002\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5c06\u6570\u7ec4\u9012\u5f52\u62c6\u5206\u6210\u5355\u4e2a\u5143\u7d20&#xff0c;\u518d\u5c06\u6709\u5e8f\u7684\u5b50\u6570\u7ec4\u4e24\u4e24\u5408\u5e76&#xff0c;\u6700\u7ec8\u5f97\u5230\u5b8c\u5168\u6709\u5e8f\u7684\u6570\u7ec4\u3002<\/p>\n<p>\u7b80\u5355\u6765\u8bf4&#xff0c;\u5f52\u5e76\u6392\u5e8f\u5c31\u50cf \u201c\u62c6\u79ef\u6728\u518d\u62fc\u8d77\u6765\u201d&#xff1a;<\/p>\n<ul>\n<li>\u628a\u590d\u6742\u7684\u5927\u6570\u7ec4\u62c6\u6210\u4e00\u4e2a\u4e2a\u5c0f\u6570\u7ec4&#xff0c;\u76f4\u5230\u6bcf\u4e2a\u5b50\u6570\u7ec4\u53ea\u6709\u4e00\u4e2a\u5143\u7d20&#xff08;\u5929\u7136\u6709\u5e8f&#xff09;&#xff1b;<\/li>\n<li>\u518d\u628a\u8fd9\u4e9b\u6709\u5e8f\u7684\u5b50\u6570\u7ec4\u4e24\u4e24\u5408\u5e76&#xff0c;\u9010\u6b65\u62fc\u6210\u4e00\u4e2a\u5b8c\u6574\u7684\u6709\u5e8f\u6570\u7ec4\u3002<\/li>\n<\/ul>\n<h3>\u4e8c\u3001\u5f52\u5e76\u6392\u5e8f\u7684\u6838\u5fc3\u6b65\u9aa4<\/h3>\n<p>\u5f52\u5e76\u6392\u5e8f\u7684\u6838\u5fc3\u6b65\u9aa4\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u4e24\u6b65&#xff1a;<\/p>\n<li>\u62c6\u5206&#xff08;Divide&#xff09;&#xff1a;\u5c06\u6570\u7ec4\u4ece\u4e2d\u95f4\u5206\u6210\u4e24\u4e2a\u5b50\u6570\u7ec4&#xff0c;\u9012\u5f52\u62c6\u5206\u76f4\u5230\u6bcf\u4e2a\u5b50\u6570\u7ec4\u53ea\u6709\u4e00\u4e2a\u5143\u7d20&#xff1b;<\/li>\n<li>\u5408\u5e76&#xff08;Merge&#xff09;&#xff1a;\u5c06\u4e24\u4e2a\u6709\u5e8f\u7684\u5b50\u6570\u7ec4\u5408\u5e76\u6210\u4e00\u4e2a\u66f4\u5927\u7684\u6709\u5e8f\u6570\u7ec4&#xff0c;\u91cd\u590d\u8fd9\u4e2a\u8fc7\u7a0b\u76f4\u5230\u6240\u6709\u5b50\u6570\u7ec4\u5408\u5e76\u6210\u4e00\u4e2a\u5b8c\u6574\u7684\u6570\u7ec4\u3002<\/li>\n<h3>\u4e09\u3001\u5f52\u5e76\u6392\u5e8f\u7684\u4ee3\u7801\u5b9e\u73b0<\/h3>\n<h4>1. Python \u7248\u672c&#xff08;\u76f4\u89c2\u6613\u61c2&#xff09;<\/h4>\n<p>def merge_sort(arr, left, right):<br \/>\n    # \u9012\u5f52\u7ec8\u6b62\u6761\u4ef6&#xff1a;\u5b50\u6570\u7ec4\u53ea\u6709\u4e00\u4e2a\u5143\u7d20<br \/>\n    if left &gt;&#061; right:<br \/>\n        return<br \/>\n    # 1. \u62c6\u5206&#xff1a;\u4ece\u4e2d\u95f4\u5206\u6210\u4e24\u4e2a\u5b50\u6570\u7ec4<br \/>\n    mid &#061; (left &#043; right) \/\/ 2<br \/>\n    merge_sort(arr, left, mid)<br \/>\n    merge_sort(arr, mid &#043; 1, right)<br \/>\n    # 2. \u5408\u5e76&#xff1a;\u5c06\u4e24\u4e2a\u6709\u5e8f\u5b50\u6570\u7ec4\u5408\u5e76<br \/>\n    merge(arr, left, mid, right)<\/p>\n<p>def merge(arr, left, mid, right):<br \/>\n    # \u5b9a\u4e49\u5de6\u53f3\u5b50\u6570\u7ec4<br \/>\n    L &#061; arr[left:mid&#043;1]<br \/>\n    R &#061; arr[mid&#043;1:right&#043;1]<br \/>\n    # \u5b9a\u4e49\u4e09\u4e2a\u6307\u9488&#xff1a;i\u904d\u5386\u5de6\u5b50\u6570\u7ec4&#xff0c;j\u904d\u5386\u53f3\u5b50\u6570\u7ec4&#xff0c;k\u904d\u5386\u539f\u6570\u7ec4<br \/>\n    i &#061; j &#061; 0<br \/>\n    k &#061; left<br \/>\n    # \u6bd4\u8f83\u5de6\u53f3\u5b50\u6570\u7ec4\u7684\u5143\u7d20&#xff0c;\u5c06\u8f83\u5c0f\u7684\u5143\u7d20\u653e\u5165\u539f\u6570\u7ec4<br \/>\n    while i &lt; len(L) and j &lt; len(R):<br \/>\n        if L[i] &lt;&#061; R[j]:<br \/>\n            arr[k] &#061; L[i]<br \/>\n            i &#043;&#061; 1<br \/>\n        else:<br \/>\n            arr[k] &#061; R[j]<br \/>\n            j &#043;&#061; 1<br \/>\n        k &#043;&#061; 1<br \/>\n    # \u5904\u7406\u5de6\u5b50\u6570\u7ec4\u5269\u4f59\u7684\u5143\u7d20<br \/>\n    while i &lt; len(L):<br \/>\n        arr[k] &#061; L[i]<br \/>\n        i &#043;&#061; 1<br \/>\n        k &#043;&#061; 1<br \/>\n    # \u5904\u7406\u53f3\u5b50\u6570\u7ec4\u5269\u4f59\u7684\u5143\u7d20<br \/>\n    while j &lt; len(R):<br \/>\n        arr[k] &#061; R[j]<br \/>\n        j &#043;&#061; 1<br \/>\n        k &#043;&#061; 1<\/p>\n<p># \u6d4b\u8bd5<br \/>\narr &#061; [12, 11, 13, 5, 6, 7]<br \/>\nn &#061; len(arr)<br \/>\nmerge_sort(arr, 0, n &#8211; 1)<br \/>\nprint(&#034;\u6392\u5e8f\u540e\u7684\u6570\u7ec4&#xff1a;&#034;, arr)  # \u8f93\u51fa&#xff1a;[5, 6, 7, 11, 12, 13]<\/p>\n<h4>2. C \u8bed\u8a00\u7248\u672c&#xff08;\u66f4\u8d34\u8fd1\u5e95\u5c42&#xff09;<\/h4>\n<p>#include &lt;stdio.h&gt;<br \/>\n#include &lt;stdlib.h&gt;<\/p>\n<p>\/\/ \u5408\u5e76\u4e24\u4e2a\u6709\u5e8f\u5b50\u6570\u7ec4<br \/>\nvoid merge(int arr[], int left, int mid, int right) {<br \/>\n    \/\/ \u8ba1\u7b97\u5de6\u53f3\u5b50\u6570\u7ec4\u7684\u5927\u5c0f<br \/>\n    int n1 &#061; mid &#8211; left &#043; 1;<br \/>\n    int n2 &#061; right &#8211; mid;<br \/>\n    \/\/ \u5206\u914d\u4e34\u65f6\u6570\u7ec4<br \/>\n    int* L &#061; (int*)malloc(n1 * sizeof(int));<br \/>\n    int* R &#061; (int*)malloc(n2 * sizeof(int));<br \/>\n    \/\/ \u590d\u5236\u6570\u636e\u5230\u4e34\u65f6\u6570\u7ec4<br \/>\n    for (int i &#061; 0; i &lt; n1; i&#043;&#043;) {<br \/>\n        L[i] &#061; arr[left &#043; i];<br \/>\n    }<br \/>\n    for (int j &#061; 0; j &lt; n2; j&#043;&#043;) {<br \/>\n        R[j] &#061; arr[mid &#043; 1 &#043; j];<br \/>\n    }<br \/>\n    \/\/ \u5b9a\u4e49\u4e09\u4e2a\u6307\u9488&#xff1a;i\u904d\u5386\u5de6\u5b50\u6570\u7ec4&#xff0c;j\u904d\u5386\u53f3\u5b50\u6570\u7ec4&#xff0c;k\u904d\u5386\u539f\u6570\u7ec4<br \/>\n    int i &#061; 0, j &#061; 0, k &#061; left;<br \/>\n    \/\/ \u6bd4\u8f83\u5de6\u53f3\u5b50\u6570\u7ec4\u7684\u5143\u7d20&#xff0c;\u5c06\u8f83\u5c0f\u7684\u5143\u7d20\u653e\u5165\u539f\u6570\u7ec4<br \/>\n    while (i &lt; n1 &amp;&amp; j &lt; n2) {<br \/>\n        if (L[i] &lt;&#061; R[j]) {<br \/>\n            arr[k] &#061; L[i];<br \/>\n            i&#043;&#043;;<br \/>\n        } else {<br \/>\n            arr[k] &#061; R[j];<br \/>\n            j&#043;&#043;;<br \/>\n        }<br \/>\n        k&#043;&#043;;<br \/>\n    }<br \/>\n    \/\/ \u5904\u7406\u5de6\u5b50\u6570\u7ec4\u5269\u4f59\u7684\u5143\u7d20<br \/>\n    while (i &lt; n1) {<br \/>\n        arr[k] &#061; L[i];<br \/>\n        i&#043;&#043;;<br \/>\n        k&#043;&#043;;<br \/>\n    }<br \/>\n    \/\/ \u5904\u7406\u53f3\u5b50\u6570\u7ec4\u5269\u4f59\u7684\u5143\u7d20<br \/>\n    while (j &lt; n2) {<br \/>\n        arr[k] &#061; R[j];<br \/>\n        j&#043;&#043;;<br \/>\n        k&#043;&#043;;<br \/>\n    }<br \/>\n    \/\/ \u91ca\u653e\u4e34\u65f6\u6570\u7ec4<br \/>\n    free(L);<br \/>\n    free(R);<br \/>\n}<\/p>\n<p>\/\/ \u5f52\u5e76\u6392\u5e8f\u51fd\u6570<br \/>\nvoid merge_sort(int arr[], int left, int right) {<br \/>\n    if (left &lt; right) {<br \/>\n        \/\/ 1. \u62c6\u5206&#xff1a;\u4ece\u4e2d\u95f4\u5206\u6210\u4e24\u4e2a\u5b50\u6570\u7ec4<br \/>\n        int mid &#061; left &#043; (right &#8211; left) \/ 2;<br \/>\n        merge_sort(arr, left, mid);<br \/>\n        merge_sort(arr, mid &#043; 1, right);<br \/>\n        \/\/ 2. \u5408\u5e76&#xff1a;\u5c06\u4e24\u4e2a\u6709\u5e8f\u5b50\u6570\u7ec4\u5408\u5e76<br \/>\n        merge(arr, left, mid, right);<br \/>\n    }<br \/>\n}<\/p>\n<p>\/\/ \u6253\u5370\u6570\u7ec4<br \/>\nvoid printArray(int arr[], int n) {<br \/>\n    for (int i &#061; 0; i &lt; n; i&#043;&#043;) {<br \/>\n        printf(&#034;%d &#034;, arr[i]);<br \/>\n    }<br \/>\n    printf(&#034;\\\\n&#034;);<br \/>\n}<\/p>\n<p>int main() {<br \/>\n    int arr[] &#061; {12, 11, 13, 5, 6, 7};<br \/>\n    int n &#061; sizeof(arr) \/ sizeof(arr[0]);<\/p>\n<p>    printf(&#034;\u6392\u5e8f\u524d&#xff1a;&#034;);<br \/>\n    printArray(arr, n);<\/p>\n<p>    merge_sort(arr, 0, n &#8211; 1);<\/p>\n<p>    printf(&#034;\u6392\u5e8f\u540e&#xff1a;&#034;);<br \/>\n    printArray(arr, n); \/\/ \u8f93\u51fa&#xff1a;5 6 7 11 12 13<\/p>\n<p>    return 0;<br \/>\n}<\/p>\n<h3>\u56db\u3001\u5f52\u5e76\u6392\u5e8f\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u548c\u7a7a\u95f4\u590d\u6742\u5ea6<\/h3>\n<ul>\n<li>\u65f6\u95f4\u590d\u6742\u5ea6&#xff1a;O (n log n)&#xff0c;\u56e0\u4e3a\u6bcf\u6b21\u62c6\u5206\u5c06\u6570\u7ec4\u5206\u6210\u4e24\u90e8\u5206&#xff0c;\u9012\u5f52\u6df1\u5ea6\u4e3a log n&#xff0c;\u6bcf\u5c42\u5408\u5e76\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a O (n)&#xff1b;<\/li>\n<li>\u7a7a\u95f4\u590d\u6742\u5ea6&#xff1a;O (n)&#xff0c;\u9700\u8981\u989d\u5916\u7684\u4e34\u65f6\u6570\u7ec4\u5b58\u50a8\u5b50\u6570\u7ec4&#xff1b;<\/li>\n<li>\u7a33\u5b9a\u6027&#xff1a;\u7a33\u5b9a&#xff0c;\u56e0\u4e3a\u5408\u5e76\u65f6\u4f1a\u4f18\u5148\u9009\u62e9\u5de6\u5b50\u6570\u7ec4\u7684\u5143\u7d20&#xff0c;\u4fdd\u6301\u76f8\u540c\u5143\u7d20\u7684\u76f8\u5bf9\u4f4d\u7f6e\u3002<\/li>\n<\/ul>\n<h3>\u4e94\u3001\u5f52\u5e76\u6392\u5e8f\u7684\u4f18\u5316<\/h3>\n<p>\u4e3a\u4e86\u63d0\u9ad8\u5f52\u5e76\u6392\u5e8f\u7684\u6548\u7387&#xff0c;\u53ef\u4ee5\u8fdb\u884c\u4ee5\u4e0b\u4f18\u5316&#xff1a;<\/p>\n<li>\u5c0f\u6570\u7ec4\u4f18\u5316&#xff1a;\u5f53\u5b50\u6570\u7ec4\u7684\u5927\u5c0f\u5c0f\u4e8e\u67d0\u4e2a\u9608\u503c&#xff08;\u5982 10&#xff09;\u65f6&#xff0c;\u4f7f\u7528\u63d2\u5165\u6392\u5e8f\u4ee3\u66ff\u5f52\u5e76\u6392\u5e8f&#xff0c;\u56e0\u4e3a\u63d2\u5165\u6392\u5e8f\u5728\u5c0f\u89c4\u6a21\u6570\u636e\u4e0a\u6548\u7387\u66f4\u9ad8&#xff1b;<\/li>\n<li>\u539f\u5730\u5f52\u5e76&#xff1a;\u4f7f\u7528\u539f\u5730\u5f52\u5e76\u7b97\u6cd5&#xff0c;\u51cf\u5c11\u989d\u5916\u7684\u5185\u5b58\u7a7a\u95f4\u4f7f\u7528&#xff0c;\u4f46\u4f1a\u589e\u52a0\u65f6\u95f4\u590d\u6742\u5ea6&#xff1b;<\/li>\n<li>\u8fed\u4ee3\u5b9e\u73b0&#xff1a;\u4f7f\u7528\u8fed\u4ee3\u4ee3\u66ff\u9012\u5f52&#xff0c;\u51cf\u5c11\u9012\u5f52\u8c03\u7528\u6808\u7684\u6df1\u5ea6&#xff0c;\u907f\u514d\u6808\u6ea2\u51fa\u3002<\/li>\n<h3>\u516d\u3001\u5f52\u5e76\u6392\u5e8f\u7684\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/h3>\n<p>\u5f52\u5e76\u6392\u5e8f\u662f\u4e00\u79cd\u7a33\u5b9a\u3001\u9ad8\u6548\u7684\u6392\u5e8f\u7b97\u6cd5&#xff0c;\u5e38\u89c1\u573a\u666f\u5305\u62ec&#xff1a;<\/p>\n<li>\u5927\u89c4\u6a21\u6570\u636e\u6392\u5e8f&#xff1a;\u5f52\u5e76\u6392\u5e8f\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u7a33\u5b9a\u4e3a O (n log n)&#xff0c;\u9002\u5408\u5927\u89c4\u6a21\u6570\u636e\u6392\u5e8f&#xff1b;<\/li>\n<li>\u5916\u90e8\u6392\u5e8f&#xff1a;\u5f53\u6570\u636e\u91cf\u592a\u5927\u65e0\u6cd5\u5168\u90e8\u52a0\u8f7d\u5230\u5185\u5b58\u65f6&#xff0c;\u4f7f\u7528\u5f52\u5e76\u6392\u5e8f\u8fdb\u884c\u5916\u90e8\u6392\u5e8f&#xff1b;<\/li>\n<li>\u7a33\u5b9a\u6027\u8981\u6c42\u9ad8\u7684\u573a\u666f&#xff1a;\u6bd4\u5982\u6392\u5e8f\u7684\u5143\u7d20\u662f\u5bf9\u8c61&#xff0c;\u9700\u8981\u4fdd\u6301\u76f8\u540c\u5143\u7d20\u7684\u76f8\u5bf9\u4f4d\u7f6e&#xff1b;<\/li>\n<li>\u94fe\u8868\u6392\u5e8f&#xff1a;\u5f52\u5e76\u6392\u5e8f\u9002\u5408\u94fe\u8868\u6392\u5e8f&#xff0c;\u56e0\u4e3a\u94fe\u8868\u7684\u5408\u5e76\u64cd\u4f5c\u4e0d\u9700\u8981\u989d\u5916\u7684\u5185\u5b58\u7a7a\u95f4\u3002<\/li>\n<h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<p>\u5f52\u5e76\u6392\u5e8f\u662f\u4e00\u79cd\u57fa\u4e8e\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5&#xff0c;\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5c06\u6570\u7ec4\u9012\u5f52\u62c6\u5206\u6210\u5355\u4e2a\u5143\u7d20&#xff0c;\u518d\u5c06\u6709\u5e8f\u7684\u5b50\u6570\u7ec4\u4e24\u4e24\u5408\u5e76&#xff0c;\u6700\u7ec8\u5f97\u5230\u5b8c\u5168\u6709\u5e8f\u7684\u6570\u7ec4\u3002<\/p>\n<p>\u5f52\u5e76\u6392\u5e8f\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a O (n log n)&#xff0c;\u7a7a\u95f4\u590d\u6742\u5ea6\u4e3a O (n)&#xff0c;\u662f\u4e00\u79cd\u7a33\u5b9a\u7684\u6392\u5e8f\u7b97\u6cd5&#xff0c;\u9002\u5408\u5927\u89c4\u6a21\u6570\u636e\u6392\u5e8f\u548c\u7a33\u5b9a\u6027\u8981\u6c42\u9ad8\u7684\u573a\u666f\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u52a9\u4f60\u7406\u89e3\u5f52\u5e76\u6392\u5e8f\u7684\u539f\u7406\u548c\u5b9e\u73b0&#xff01;<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u4ec0\u4e48\u662f\u5f52\u5e76\u6392\u5e8f&#xff1f;\u5f52\u5e76\u6392\u5e8f&#xff08;Merge Sort&#xff09;\u662f\u4e00\u79cd\u57fa\u4e8e\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5&#xff0c;\u7531 John von Neumann \u5728 1945 \u5e74\u63d0\u51fa\u3002\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5c06\u6570\u7ec4\u9012\u5f52\u62c6\u5206\u6210\u5355\u4e2a\u5143\u7d20&#xff0c;\u518d\u5c06\u6709\u5e8f\u7684\u5b50\u6570\u7ec4\u4e24\u4e24\u5408\u5e76&#xff0c;\u6700\u7ec8\u5f97\u5230\u5b8c\u5168\u6709\u5e8f\u7684\u6570\u7ec4\u3002\u7b80\u5355\u6765\u8bf4&#xff0c;\u5f52\u5e76\u6392\u5e8f\u5c31\u50cf \u201c\u62c6\u79ef\u6728\u518d\u62fc\u8d77\u6765\u201d&#xff1a;\u628a\u590d\u6742\u7684\u5927\u6570\u7ec4\u62c6\u6210\u4e00\u4e2a\u4e2a\u5c0f\u6570\u7ec4&#xff0c;\u76f4\u5230\u6bcf\u4e2a\u5b50\u6570\u7ec4\u53ea\u6709\u4e00\u4e2a\u5143\u7d20&amp;#xff08<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[190,3226,1813,427],"topic":[],"class_list":["post-100779","post","type-post","status-publish","format-standard","hentry","category-server","tag-190","tag-3226","tag-1813","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/100779.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u4ec0\u4e48\u662f\u5f52\u5e76\u6392\u5e8f&#xff1f;\u5f52\u5e76\u6392\u5e8f&#xff08;Merge Sort&#xff09;\u662f\u4e00\u79cd\u57fa\u4e8e\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5&#xff0c;\u7531 John von Neumann \u5728 1945 \u5e74\u63d0\u51fa\u3002\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5c06\u6570\u7ec4\u9012\u5f52\u62c6\u5206\u6210\u5355\u4e2a\u5143\u7d20&#xff0c;\u518d\u5c06\u6709\u5e8f\u7684\u5b50\u6570\u7ec4\u4e24\u4e24\u5408\u5e76&#xff0c;\u6700\u7ec8\u5f97\u5230\u5b8c\u5168\u6709\u5e8f\u7684\u6570\u7ec4\u3002\u7b80\u5355\u6765\u8bf4&#xff0c;\u5f52\u5e76\u6392\u5e8f\u5c31\u50cf \u201c\u62c6\u79ef\u6728\u518d\u62fc\u8d77\u6765\u201d&#xff1a;\u628a\u590d\u6742\u7684\u5927\u6570\u7ec4\u62c6\u6210\u4e00\u4e2a\u4e2a\u5c0f\u6570\u7ec4&#xff0c;\u76f4\u5230\u6bcf\u4e2a\u5b50\u6570\u7ec4\u53ea\u6709\u4e00\u4e2a\u5143\u7d20&amp;#xff08\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/100779.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-05T01:57:08+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100779.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/100779.html\",\"name\":\"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-05T01:57:08+00:00\",\"dateModified\":\"2026-09-05T01:57:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/100779.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/100779.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/100779.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/100779.html","og_locale":"zh_CN","og_type":"article","og_title":"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u4ec0\u4e48\u662f\u5f52\u5e76\u6392\u5e8f&#xff1f;\u5f52\u5e76\u6392\u5e8f&#xff08;Merge Sort&#xff09;\u662f\u4e00\u79cd\u57fa\u4e8e\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5&#xff0c;\u7531 John von Neumann \u5728 1945 \u5e74\u63d0\u51fa\u3002\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5c06\u6570\u7ec4\u9012\u5f52\u62c6\u5206\u6210\u5355\u4e2a\u5143\u7d20&#xff0c;\u518d\u5c06\u6709\u5e8f\u7684\u5b50\u6570\u7ec4\u4e24\u4e24\u5408\u5e76&#xff0c;\u6700\u7ec8\u5f97\u5230\u5b8c\u5168\u6709\u5e8f\u7684\u6570\u7ec4\u3002\u7b80\u5355\u6765\u8bf4&#xff0c;\u5f52\u5e76\u6392\u5e8f\u5c31\u50cf \u201c\u62c6\u79ef\u6728\u518d\u62fc\u8d77\u6765\u201d&#xff1a;\u628a\u590d\u6742\u7684\u5927\u6570\u7ec4\u62c6\u6210\u4e00\u4e2a\u4e2a\u5c0f\u6570\u7ec4&#xff0c;\u76f4\u5230\u6bcf\u4e2a\u5b50\u6570\u7ec4\u53ea\u6709\u4e00\u4e2a\u5143\u7d20&amp;#xff08","og_url":"https:\/\/www.wsisp.com\/helps\/100779.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-05T01:57:08+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/100779.html","url":"https:\/\/www.wsisp.com\/helps\/100779.html","name":"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-05T01:57:08+00:00","dateModified":"2026-09-05T01:57:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/100779.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/100779.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/100779.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"12.\u5f52\u5e76\u6392\u5e8f\uff1a\u5206\u6cbb\u601d\u60f3\u7684\u7a33\u5b9a\u6392\u5e8f\u7b97\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=100779"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/100779\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=100779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=100779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=100779"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=100779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}