{"id":477994,"date":"2023-08-09T09:25:37","date_gmt":"2023-08-09T09:25:37","guid":{"rendered":""},"modified":"2023-09-05T11:15:51","modified_gmt":"2023-09-05T11:15:51","slug":"merge-sort","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/jp\/wiki\/merge-sort\/","title":{"rendered":"\u30de\u30fc\u30b8\u30bd\u30fc\u30c8"},"content":{"rendered":"<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30b5\u30a4\u30a8\u30f3\u30b9\u3067\u6700\u3082\u52b9\u7387\u7684\u3067\u5e83\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e 1 \u3064\u3067\u3059\u3002\u3053\u308c\u306f\u5206\u5272\u7d71\u6cbb\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u30ab\u30c6\u30b4\u30ea\u306b\u5c5e\u3057\u3001\u554f\u984c\u3092\u5c0f\u3055\u306a\u30b5\u30d6\u554f\u984c\u306b\u5206\u5272\u3057\u3001\u518d\u5e30\u7684\u306b\u89e3\u6c7a\u3057\u3066\u304b\u3089\u7d50\u5408\u3057\u3066\u6700\u7d42\u7d50\u679c\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u5b89\u5b9a\u3057\u305f\u4e88\u6e2c\u53ef\u80fd\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3067\u77e5\u3089\u308c\u3066\u304a\u308a\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30bd\u30fc\u30c8\u306b\u3055\u307e\u3056\u307e\u306a\u7528\u9014\u3067\u4f7f\u7528\u3055\u308c\u3066\u304a\u308a\u3001\u958b\u767a\u8005\u3084\u30c7\u30fc\u30bf \u30a2\u30ca\u30ea\u30b9\u30c8\u306b\u3068\u3063\u3066\u91cd\u8981\u306a\u30c4\u30fc\u30eb\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u8d77\u6e90\u3068\u305d\u306e\u6700\u521d\u306e\u8a00\u53ca\u306e\u6b74\u53f2<\/h2>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306e\u6982\u5ff5\u306f 1940 \u5e74\u4ee3\u306b\u9061\u308a\u30011945 \u5e74\u306b\u30b8\u30e7\u30f3 \u30d5\u30a9\u30f3 \u30ce\u30a4\u30de\u30f3\u306b\u3088\u3063\u3066\u521d\u3081\u3066\u63d0\u6848\u3055\u308c\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u30b8\u30e7\u30f3 \u30d5\u30a9\u30f3 \u30ce\u30a4\u30de\u30f3\u3068\u30b9\u30bf\u30cb\u30b9\u30ef\u30d5 \u30a6\u30e9\u30e0\u304c\u3053\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5f62\u5f0f\u5316\u3057\u3001\u305d\u306e\u57fa\u672c\u539f\u7406\u3092\u78ba\u7acb\u3057\u305f\u306e\u306f 1948 \u5e74\u306e\u3053\u3068\u3067\u3057\u305f\u3002\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306b\u95a2\u3059\u308b\u5f7c\u3089\u306e\u7814\u7a76\u306f\u3001\u4e3b\u306b\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u52b9\u7387\u7684\u306b\u30bd\u30fc\u30c8\u3059\u308b\u3053\u3068\u306b\u95a2\u9023\u3057\u3066\u304a\u308a\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc \u30b5\u30a4\u30a8\u30f3\u30b9\u3068\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u8a2d\u8a08\u306e\u5c06\u6765\u306e\u767a\u5c55\u306e\u57fa\u790e\u3092\u7bc9\u304f\u4e0a\u3067\u6975\u3081\u3066\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306b\u95a2\u3059\u308b\u8a73\u7d30\u60c5\u5831: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u30c8\u30d4\u30c3\u30af\u306e\u62e1\u5f35<\/h2>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30ea\u30b9\u30c8\u3092\u5c0f\u3055\u306a\u30b5\u30d6\u30ea\u30b9\u30c8\u306b\u5206\u5272\u3057\u3001\u3053\u308c\u3089\u306e\u30b5\u30d6\u30ea\u30b9\u30c8\u3092\u30bd\u30fc\u30c8\u3057\u3066\u304b\u3089\u3001\u305d\u308c\u3089\u3092\u518d\u3073\u30de\u30fc\u30b8\u3057\u3066\u5b8c\u5168\u306b\u30bd\u30fc\u30c8\u3055\u308c\u305f\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3059\u308b\u3068\u3044\u3046\u539f\u7406\u306b\u57fa\u3065\u3044\u3066\u52d5\u4f5c\u3057\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u6b21\u306e\u624b\u9806\u306b\u5206\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u5206\u3051\u308b<\/strong>: \u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30ea\u30b9\u30c8\u306f\u3001\u5404\u30b5\u30d6\u30ea\u30b9\u30c8\u306b 1 \u3064\u306e\u8981\u7d20\u304c\u542b\u307e\u308c\u308b\u307e\u3067\u3001\u7e70\u308a\u8fd4\u3057 2 \u3064\u306e\u5747\u7b49\u306a\u534a\u5206\u306b\u5206\u5272\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u5f81\u670d\u3059\u308b<\/strong>: \u500b\u3005\u306e\u8981\u7d20\u306f\u305d\u308c\u305e\u308c\u30bd\u30fc\u30c8\u3055\u308c\u305f\u30b5\u30d6\u30ea\u30b9\u30c8\u3068\u898b\u306a\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30de\u30fc\u30b8<\/strong>: \u30bd\u30fc\u30c8\u3055\u308c\u305f\u30b5\u30d6\u30ea\u30b9\u30c8\u306f\u7d50\u5408\u3055\u308c\u3001\u8981\u7d20\u304c\u6bd4\u8f03\u3055\u308c\u3066\u7d50\u5408\u3055\u308c\u3001\u6700\u7d42\u7684\u306a\u30bd\u30fc\u30c8\u3055\u308c\u305f\u30ea\u30b9\u30c8\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001O(n log n) \u306e\u6642\u9593\u8a08\u7b97\u91cf\u3092\u793a\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u3001\u300cn\u300d\u306f\u30ea\u30b9\u30c8\u5185\u306e\u8981\u7d20\u306e\u6570\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u7279\u306b\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u306b\u3001\u30d0\u30d6\u30eb \u30bd\u30fc\u30c8\u3084\u633f\u5165\u30bd\u30fc\u30c8\u306a\u3069\u306e\u4ed6\u306e\u4e00\u822c\u7684\u306a\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3088\u308a\u3082\u5927\u5e45\u306b\u9ad8\u901f\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u5185\u90e8\u69cb\u9020: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u4ed5\u7d44\u307f<\/h2>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u518d\u5e30\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u4f7f\u7528\u3057\u3066\u5b9f\u88c5\u3055\u308c\u307e\u3059\u3002\u30b3\u30a2\u95a2\u6570\u306f\u5165\u529b\u30ea\u30b9\u30c8\u3092 2 \u3064\u306e\u534a\u5206\u306b\u5206\u5272\u3057\u3001\u5404\u534a\u5206\u306f\u540c\u3058\u518d\u5e30\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u4f7f\u7528\u3057\u3066\u500b\u5225\u306b\u30bd\u30fc\u30c8\u3055\u308c\u307e\u3059\u3002\u500b\u3005\u306e\u534a\u5206\u304c\u30bd\u30fc\u30c8\u3055\u308c\u305f\u5f8c\u3001\u30de\u30fc\u30b8 \u30b9\u30c6\u30c3\u30d7\u3067\u305d\u308c\u3089\u3092 1 \u3064\u306e\u30bd\u30fc\u30c8\u6e08\u307f\u30ea\u30b9\u30c8\u306b\u7d50\u5408\u3057\u307e\u3059\u3002\u30de\u30fc\u30b8 \u30d7\u30ed\u30bb\u30b9\u306f\u3001\u4e21\u65b9\u306e\u534a\u5206\u306e\u8981\u7d20\u3092\u6bd4\u8f03\u3057\u3066\u6700\u7d42\u51fa\u529b\u306b\u30de\u30fc\u30b8\u3059\u308b 2 \u3064\u306e\u30e1\u30a4\u30f3 \u30dd\u30a4\u30f3\u30bf\u30fc\u306b\u3088\u3063\u3066\u4fc3\u9032\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u4e3b\u306a\u7279\u5fb4\u306e\u5206\u6790<\/h2>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306b\u306f\u3001\u30bd\u30fc\u30c8 \u30bf\u30b9\u30af\u3067\u3088\u304f\u9078\u629e\u3055\u308c\u308b\u3044\u304f\u3064\u304b\u306e\u91cd\u8981\u306a\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u5b9a\u6027<\/strong>: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306f\u5b89\u5b9a\u3057\u305f\u30bd\u30fc\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u3059\u3002\u3064\u307e\u308a\u3001\u7b49\u3057\u3044\u8981\u7d20\u306f\u3001\u5143\u306e\u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30ea\u30b9\u30c8\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u30bd\u30fc\u30c8\u3055\u308c\u305f\u51fa\u529b\u3067\u3082\u76f8\u5bfe\u7684\u306a\u9806\u5e8f\u3092\u7dad\u6301\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u4e88\u6e2c\u53ef\u80fd\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9<\/strong>: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u6642\u9593\u8a08\u7b97\u91cf\u306f O(n log n) \u3067\u3042\u308b\u305f\u3081\u3001\u4e00\u8cab\u6027\u306e\u3042\u308b\u52b9\u7387\u7684\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u4fdd\u8a3c\u3055\u308c\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30ea\u30f3\u30af\u30ea\u30b9\u30c8\u306b\u9069\u3057\u3066\u3044\u307e\u3059<\/strong>\u4ed6\u306e\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3068\u306f\u7570\u306a\u308a\u3001\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u30e9\u30f3\u30c0\u30e0 \u30a2\u30af\u30bb\u30b9\u306e\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u9806\u6b21\u30a2\u30af\u30bb\u30b9 \u30d1\u30bf\u30fc\u30f3\u306b\u3088\u308a\u3001\u30ea\u30f3\u30af \u30ea\u30b9\u30c8\u3067\u3082\u540c\u69d8\u306b\u512a\u308c\u305f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u767a\u63ee\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u308b<\/strong>: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u518d\u5e30\u7684\u306a\u6027\u8cea\u3068\u7c21\u5358\u306a\u30de\u30fc\u30b8\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u308a\u3001\u3055\u307e\u3056\u307e\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u5b9f\u88c5\u3059\u308b\u306e\u304c\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u7a2e\u985e<\/h2>\n<p>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306b\u306f\u4e3b\u306b 2 \u3064\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u30c8\u30c3\u30d7\u30c0\u30a6\u30f3\u30de\u30fc\u30b8\u30bd\u30fc\u30c8<\/strong>: \u3053\u308c\u306f\u3001\u518d\u5e30\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30b9\u30c8\u3092\u5206\u5272\u3057\u3001\u30b5\u30d6\u30ea\u30b9\u30c8\u3092\u30bd\u30fc\u30c8\u3059\u308b\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306e\u5178\u578b\u7684\u306a\u5b9f\u88c5\u3067\u3059\u3002\u30ea\u30b9\u30c8\u5168\u4f53\u304b\u3089\u958b\u59cb\u3057\u3001\u57fa\u672c\u30b1\u30fc\u30b9 (\u5358\u4e00\u8981\u7d20\u30ea\u30b9\u30c8) \u306b\u9054\u3059\u308b\u307e\u3067\u3001\u30ea\u30b9\u30c8\u3092\u518d\u5e30\u7684\u306b\u5c0f\u3055\u306a\u30b5\u30d6\u30ea\u30b9\u30c8\u306b\u5206\u5272\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30b5\u30d6\u30ea\u30b9\u30c8\u306f\u30bd\u30fc\u30c8\u3055\u308c\u305f\u30ea\u30b9\u30c8\u306b\u30de\u30fc\u30b8\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30dc\u30c8\u30e0\u30a2\u30c3\u30d7\u30de\u30fc\u30b8\u30bd\u30fc\u30c8<\/strong>: \u3053\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306f\u30ea\u30b9\u30c8\u3092\u56fa\u5b9a\u30b5\u30a4\u30ba\u306e\u30b5\u30d6\u30ea\u30b9\u30c8\u306b\u7e70\u308a\u8fd4\u3057\u5206\u5272\u3057\u3001\u30dc\u30c8\u30e0\u30a2\u30c3\u30d7\u65b9\u5f0f\u3067\u7d50\u5408\u3057\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u30ea\u30b9\u30c8\u5168\u4f53\u304c\u30bd\u30fc\u30c8\u3055\u308c\u308b\u307e\u3067\u7d9a\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u30c6\u30fc\u30d6\u30eb\u5185\u306e 2 \u7a2e\u985e\u306e\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u3092\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u30d0\u30ea\u30a2\u30f3\u30c8<\/th>\n<th>\u9577\u6240<\/th>\n<th>\u77ed\u6240<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u30c8\u30c3\u30d7\u30c0\u30a6\u30f3\u30de\u30fc\u30b8\u30bd\u30fc\u30c8<\/td>\n<td>\u7406\u89e3\u3057\u3084\u3059\u304f\u5b9f\u88c5\u3057\u3084\u3059\u3044<\/td>\n<td>\u518d\u5e30\u306b\u306f\u8ffd\u52a0\u306e\u30e1\u30e2\u30ea\u304c\u5fc5\u8981<\/td>\n<\/tr>\n<tr>\n<td>\u30dc\u30c8\u30e0\u30a2\u30c3\u30d7\u30de\u30fc\u30b8\u30bd\u30fc\u30c8<\/td>\n<td>\u518d\u5e30\u306a\u3057\u3001\u30e1\u30e2\u30ea\u3092\u7bc0\u7d04<\/td>\n<td>\u5b9f\u88c5\u304c\u3088\u308a\u8907\u96d1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u4f7f\u3044\u65b9\u3001\u4f7f\u7528\u4e0a\u306e\u554f\u984c\u3068\u305d\u306e\u89e3\u6c7a\u7b56<\/h2>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306e\u52b9\u7387\u6027\u3068\u5b89\u5b9a\u6027\u306f\u3001\u7279\u306b\u540c\u3058\u8981\u7d20\u306e\u9806\u5e8f\u3092\u7dad\u6301\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3042\u308b\u5834\u5408\u306b\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30bd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306e\u7406\u60f3\u7684\u306a\u9078\u629e\u80a2\u3068\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u305d\u306e\u4f7f\u7528\u306b\u95a2\u9023\u3059\u308b\u8ab2\u984c\u3068\u6f5c\u5728\u7684\u306a\u89e3\u6c7a\u7b56\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u30e1\u30e2\u30ea\u6d88\u8cbb\u91cf<\/strong>: \u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u3067\u306f\u3001\u7279\u306b\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u6271\u3046\u5834\u5408\u3001\u518d\u5e30\u547c\u3073\u51fa\u3057\u306e\u305f\u3081\u306b\u8ffd\u52a0\u306e\u30e1\u30e2\u30ea\u304c\u5fc5\u8981\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u518d\u5e30\u3092\u56de\u907f\u3059\u308b\u30dc\u30c8\u30e0\u30a2\u30c3\u30d7 \u30de\u30fc\u30b8 \u30bd\u30fc\u30c8 \u30d0\u30ea\u30a2\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u8efd\u6e1b\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9<\/strong>: \u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u4ed6\u306e\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3068\u540c\u69d8\u306b\u3001\u6642\u9593\u306e\u8a08\u7b97\u91cf\u304c\u3042\u308a\u307e\u3059\u3002\u307b\u3068\u3093\u3069\u306e\u30b7\u30ca\u30ea\u30aa\u3067\u306f\u9069\u5207\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u958b\u767a\u8005\u306f\u3001\u30aa\u30fc\u30d0\u30fc\u30d8\u30c3\u30c9\u3092\u524a\u6e1b\u3059\u308b\u305f\u3081\u306b\u3001\u3088\u308a\u5c0f\u3055\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u306f\u5225\u306e\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u4f7f\u7528\u3092\u691c\u8a0e\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7279\u6b8a\u306a\u30b1\u30fc\u30b9\u306e\u6700\u9069\u5316<\/strong>: \u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306e\u6642\u9593\u8a08\u7b97\u91cf\u306f\u3001\u30c7\u30fc\u30bf\u5206\u5e03\u306b\u95a2\u4fc2\u306a\u304f\u4e00\u5b9a\u3067\u3059\u3002\u3059\u3067\u306b\u90e8\u5206\u7684\u306b\u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u5834\u5408\u306f\u3001\u307b\u307c\u30bd\u30fc\u30c8\u3055\u308c\u305f\u30ea\u30b9\u30c8\u3067\u3088\u308a\u512a\u308c\u305f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u767a\u63ee\u3059\u308b\u633f\u5165\u30bd\u30fc\u30c8\u306a\u3069\u306e\u4ed6\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u4f7f\u7528\u3059\u308b\u3068\u52b9\u679c\u7684\u306a\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u4e3b\u306a\u7279\u5fb4\u3068\u985e\u4f3c\u7528\u8a9e\u3068\u306e\u6bd4\u8f03<\/h2>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u3068\u3001\u4ed6\u306e 2 \u3064\u306e\u4e00\u822c\u7684\u306a\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u3042\u308b\u30af\u30a4\u30c3\u30af \u30bd\u30fc\u30c8\u304a\u3088\u3073\u30d2\u30fc\u30d7 \u30bd\u30fc\u30c8\u3092\u8868\u3067\u6bd4\u8f03\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0<\/th>\n<th>\u6642\u9593\u8a08\u7b97\u91cf<\/th>\n<th>\u5b89\u5b9a\u6027<\/th>\n<th>\u7a7a\u9593\u306e\u8907\u96d1\u3055<\/th>\n<th>\u5b9f\u88c5\u306e\u8907\u96d1\u3055<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8<\/td>\n<td>O(nlogn) \u3067\u3059\u3002<\/td>\n<td>\u5b89\u5b9a\u3057\u305f<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<td>\u9069\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>\u30af\u30a4\u30c3\u30af\u30bd\u30fc\u30c8<\/td>\n<td>O(n log n) (\u5e73\u5747)<\/td>\n<td>\u4e0d\u5b89\u5b9a<\/td>\n<td>O(log n)<\/td>\n<td>\u9069\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>\u30d2\u30fc\u30d7\u30bd\u30fc\u30c8<\/td>\n<td>O(nlogn) \u3067\u3059\u3002<\/td>\n<td>\u4e0d\u5b89\u5b9a<\/td>\n<td>\u25cb(1)<\/td>\n<td>\u8907\u96d1\u306a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306b\u95a2\u3059\u308b\u5c06\u6765\u306e\u5c55\u671b\u3068\u6280\u8853<\/h2>\n<p>\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u4f9d\u7136\u3068\u3057\u3066\u57fa\u672c\u7684\u306a\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u3059\u304c\u3001\u7d76\u3048\u305a\u9032\u5316\u3059\u308b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30b5\u30a4\u30a8\u30f3\u30b9\u306e\u5206\u91ce\u3067\u306f\u3001\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306b\u5bfe\u3059\u308b\u65b0\u3057\u3044\u8996\u70b9\u3084\u6700\u9069\u5316\u304c\u5e38\u306b\u63d0\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u7814\u7a76\u8005\u3084\u958b\u767a\u8005\u306f\u3001\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u3084\u305d\u306e\u4ed6\u306e\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u9069\u5fdc\u3055\u305b\u3066\u4e26\u5217\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3001\u5206\u6563\u30b7\u30b9\u30c6\u30e0\u3001\u9ad8\u5ea6\u306a\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u6d3b\u7528\u3059\u308b\u65b9\u6cd5\u3092\u5e38\u306b\u6a21\u7d22\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u8ffd\u6c42\u306e\u76ee\u7684\u306f\u3001\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u52b9\u7387\u6027\u3068\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u3092\u3055\u3089\u306b\u5f37\u5316\u3057\u3001\u30d3\u30c3\u30b0 \u30c7\u30fc\u30bf\u3084\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u51e6\u7406\u306e\u30b7\u30ca\u30ea\u30aa\u306b\u3055\u3089\u306b\u9069\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u30fc\u306e\u4f7f\u7528\u65b9\u6cd5\u3084\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u3068\u306e\u95a2\u9023\u4ed8\u3051\u65b9\u6cd5<\/h2>\n<p>OneProxy \u304c\u63d0\u4f9b\u3059\u308b\u3088\u3046\u306a\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8 \u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u306e\u7ba1\u7406\u3068\u6700\u9069\u5316\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u3068\u76f4\u63a5\u95a2\u4fc2\u304c\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u91cd\u8981\u6027\u306f\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u306e\u9ad8\u901f\u3067\u30b7\u30fc\u30e0\u30ec\u30b9\u306a\u30c7\u30fc\u30bf\u8ee2\u9001\u306e\u30cb\u30fc\u30ba\u3068\u4e00\u81f4\u3057\u3066\u3044\u307e\u3059\u3002\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306e\u5b89\u5b9a\u6027\u3068\u4e88\u6e2c\u53ef\u80fd\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u7279\u6027\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u30c7\u30fc\u30bf\u7ba1\u7406\u30d7\u30ed\u30bb\u30b9\u3092\u5f37\u5316\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u30b9\u30e0\u30fc\u30ba\u306a\u30d6\u30e9\u30a6\u30b8\u30f3\u30b0\u4f53\u9a13\u3092\u63d0\u4f9b\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u30ea\u30f3\u30af<\/h2>\n<p>\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/www.geeksforgeeks.org\/merge-sort\/\" target=\"_new\" rel=\"noopener nofollow\">GeeksforGeeks: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Merge_sort\" target=\"_new\" rel=\"noopener nofollow\">Wikipedia: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/www.topcoder.com\/thrive\/articles\/Merge%20Sort%20Tutorial\" target=\"_new\" rel=\"noopener nofollow\">TopCoder: \u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/a><\/li>\n<\/ol>\n<p>\u7d50\u8ad6\u3068\u3057\u3066\u3001\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30b5\u30a4\u30a8\u30f3\u30b9\u306b\u304a\u3044\u3066\u6700\u3082\u4fe1\u983c\u6027\u304c\u9ad8\u304f\u52b9\u7387\u7684\u306a\u30bd\u30fc\u30c8 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e 1 \u3064\u3067\u3059\u3002\u305d\u306e\u5206\u5272\u7d71\u6cbb\u30a2\u30d7\u30ed\u30fc\u30c1\u3001\u5b89\u5b9a\u6027\u3001\u4e88\u6e2c\u53ef\u80fd\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u3088\u308a\u3001\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30bd\u30fc\u30c8\u306b\u597d\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u30c6\u30af\u30ce\u30ed\u30b8\u304c\u9032\u5316\u3057\u7d9a\u3051\u308b\u4e2d\u3001\u30de\u30fc\u30b8 \u30bd\u30fc\u30c8\u306f\u30bd\u30fc\u30c8 \u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u91cd\u8981\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u3042\u308a\u7d9a\u3051\u3001\u3055\u307e\u3056\u307e\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084\u30b7\u30b9\u30c6\u30e0\u306e\u30b9\u30e0\u30fc\u30ba\u306a\u52d5\u4f5c\u306b\u7d99\u7d9a\u7684\u306b\u8ca2\u732e\u3059\u308b\u3067\u3057\u3087\u3046\u3002<\/p>","protected":false},"featured_media":468892,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-477994","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Merge Sort: A Comprehensive Guide<\/mark>","faq_items":[{"question":"What is Merge sort and why is it important?","answer":"<p>Merge sort is a widely-used sorting algorithm in computer science. It efficiently sorts large datasets by dividing the list into smaller sublists, sorting them, and then merging them back to obtain a fully sorted list. Its importance lies in its stable and predictable performance, making it a crucial tool for developers and data analysts dealing with extensive data.<\/p>"},{"question":"Who proposed Merge sort, and when was it first mentioned?","answer":"<p>Merge sort was first proposed by John von Neumann in 1945, but it was formalized and established by John von Neumann and Stanislaw Ulam in 1948. Their work on Merge sort laid the foundation for future developments in algorithm design and computer science.<\/p>"},{"question":"How does Merge sort work internally?","answer":"<p>Merge sort works on a divide-and-conquer approach. It recursively divides the unsorted list into two halves, sorts them independently, and then merges them back into a fully sorted list. The merging process uses two pointers to compare and combine elements.<\/p>"},{"question":"What are the key features of Merge sort?","answer":"<p>Merge sort offers stability, meaning that equal elements retain their original order in the sorted output. It demonstrates predictable performance with a time complexity of O(n log n), making it faster than many other sorting algorithms. Moreover, Merge sort is suitable for linked lists and relatively easy to implement.<\/p>"},{"question":"What are the different types of Merge sort?","answer":"<p>There are two main variants of Merge sort: Top-Down Merge sort and Bottom-Up Merge sort. The former uses recursion to divide and sort the list, while the latter iteratively divides the list into fixed-size sublists and merges them in a bottom-up fashion.<\/p>"},{"question":"How can Merge sort be used effectively, and what problems may arise?","answer":"<p>Merge sort is ideal for sorting large datasets while preserving the order of equal elements. However, it may consume additional memory for recursion, which can be mitigated by using the Bottom-Up Merge sort variant. Additionally, for partially sorted data, considering alternative algorithms like Insertion sort may optimize performance.<\/p>"},{"question":"How does Merge sort compare with other sorting algorithms?","answer":"<p>In comparison to Quick sort and Heap sort, Merge sort stands out with its stability and moderate implementation complexity. Quick sort has similar average time complexity, but it is unstable and has a different space complexity. On the other hand, Heap sort is also unstable but has a constant space complexity, making it more complex to implement.<\/p>"},{"question":"What does the future hold for Merge sort and related technologies?","answer":"<p>As technology evolves, researchers and developers continue to explore ways to adapt sorting algorithms like Merge sort to leverage parallel computing, distributed systems, and advanced hardware architectures. These advancements aim to further enhance efficiency and scalability, enabling sorting algorithms to handle big data and real-time processing scenarios effectively.<\/p>"},{"question":"How are proxy servers associated with Merge sort?","answer":"<p>While Merge sort itself may not have a direct association with proxy servers, the efficient data handling principles align with the need for rapid and seamless data transfer on the internet. Proxy servers, such as OneProxy, can leverage Merge sort's stable performance characteristics to enhance their data management processes, ensuring a smooth browsing experience for users.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/477994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/477994\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media\/468892"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media?parent=477994"}],"curies":[{"name":"\u3046\u30fc\u3093","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}