{"id":476022,"date":"2023-08-09T07:25:33","date_gmt":"2023-08-09T07:25:33","guid":{"rendered":""},"modified":"2023-09-05T11:11:51","modified_gmt":"2023-09-05T11:11:51","slug":"binary-tree","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/jp\/wiki\/binary-tree\/","title":{"rendered":"\u4e8c\u5206\u6728"},"content":{"rendered":"<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30b5\u30a4\u30a8\u30f3\u30b9\u3068\u6570\u5b66\u3067\u8981\u7d20\u9593\u306e\u968e\u5c64\u95a2\u4fc2\u3092\u8868\u3059\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u3059\u3002\u3053\u308c\u306f\u3001\u30a8\u30c3\u30b8\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30ce\u30fc\u30c9\u3067\u69cb\u6210\u3055\u308c\u3001\u30c4\u30ea\u30fc\u72b6\u306e\u69cb\u9020\u3092\u5f62\u6210\u3057\u307e\u3059\u3002\u5404\u30ce\u30fc\u30c9\u306f\u3001\u5de6\u306e\u5b50\u3068\u53f3\u306e\u5b50\u3068\u547c\u3070\u308c\u308b\u6700\u5927 2 \u3064\u306e\u5b50\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u3051\u3001\u691c\u7d22\u3001\u4e26\u3079\u66ff\u3048\u3001\u5f0f\u306e\u89e3\u6790\u306a\u3069\u3001\u3055\u307e\u3056\u307e\u306a\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002<\/p>\n<h2>Binary Tree \u306e\u8d77\u6e90\u3068\u305d\u306e\u6700\u521d\u306e\u8a00\u53ca\u306e\u6b74\u53f2<\/h2>\n<p>\u30c4\u30ea\u30fc\u306e\u6982\u5ff5\u306f\u3001\u6570\u5b66\u8005\u3084\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u79d1\u5b66\u8005\u304c\u968e\u5c64\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u63a2\u7d22\u3057\u59cb\u3081\u305f 19 \u4e16\u7d00\u521d\u982d\u306b\u9061\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u4eca\u65e5\u79c1\u305f\u3061\u304c\u77e5\u3063\u3066\u3044\u308b\u30d0\u30a4\u30ca\u30ea\u30fc \u30c4\u30ea\u30fc\u306b\u3064\u3044\u3066\u6700\u521d\u306b\u8a00\u53ca\u3055\u308c\u305f\u306e\u306f\u300120 \u4e16\u7d00\u534a\u3070\u307e\u3067\u9061\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u8457\u540d\u306a\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u79d1\u5b66\u8005\u30b8\u30e7\u30f3 \u30d5\u30a9\u30f3 \u30ce\u30a4\u30de\u30f3\u306f\u30011945 \u5e74\u306b EDVAC \u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u308b\u3068\u304d\u306b\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u6982\u5ff5\u3092\u5c0e\u5165\u3057\u307e\u3057\u305f\u3002\u305d\u306e\u5f8c\u3001\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u8a08\u7b97\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u52b9\u7387\u304c\u9ad8\u3044\u305f\u3081\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30b5\u30a4\u30a8\u30f3\u30b9\u306e\u5206\u91ce\u3067\u3055\u3089\u306b\u6ce8\u76ee\u3092\u96c6\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<h2>\u30d0\u30a4\u30ca\u30ea\u30fc\u30c4\u30ea\u30fc\u306e\u8a73\u7d30\u60c5\u5831<\/h2>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306f\u30ce\u30fc\u30c9\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u3042\u308a\u3001\u5404\u30ce\u30fc\u30c9\u306b\u306f\u6700\u5927\u3067 2 \u3064\u306e\u5b50 (\u5de6\u306e\u5b50\u3068\u53f3\u306e\u5b50) \u304c\u3042\u308a\u307e\u3059\u3002\u30c4\u30ea\u30fc\u306e\u6700\u4e0a\u4f4d\u306e\u30ce\u30fc\u30c9\u306f\u30eb\u30fc\u30c8\u3068\u547c\u3070\u308c\u3001\u5b50\u306e\u306a\u3044\u30ce\u30fc\u30c9\u306f\u8449\u3068\u547c\u3070\u308c\u307e\u3059\u3002\u30ce\u30fc\u30c9\u306f\u30a8\u30c3\u30b8\u3092\u4ecb\u3057\u3066\u76f8\u4e92\u63a5\u7d9a\u3055\u308c\u3066\u304a\u308a\u3001\u30a8\u30c3\u30b8\u306f\u8981\u7d20\u9593\u306e\u95a2\u4fc2\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<h3>\u4e8c\u5206\u6728\u306e\u30d7\u30ed\u30d1\u30c6\u30a3:<\/h3>\n<ol>\n<li>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u5185\u306e\u5404\u30ce\u30fc\u30c9\u306b\u306f\u3001\u6700\u5927 2 \u3064\u306e\u5b50\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li>\u5404\u30ce\u30fc\u30c9\u306f\u30010\u30011\u3001\u307e\u305f\u306f 2 \u3064\u306e\u5b50\u3092\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306b\u306f\u968e\u5c64\u69cb\u9020\u304c\u3042\u308a\u3001\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf \u30a2\u30af\u30bb\u30b9\u3068\u64cd\u4f5c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<li>\u9069\u5207\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3067\u306f\u3001\u5404\u975e\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u306b\u306f\u3061\u3087\u3046\u3069 2 \u3064\u306e\u5b50\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u6df1\u3055\u306f\u3001\u30eb\u30fc\u30c8\u3068\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u9593\u306e\u6700\u5927\u8ddd\u96e2\u3067\u3059\u3002<\/li>\n<li>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u9ad8\u3055\u306f\u3001\u30c4\u30ea\u30fc\u5185\u306e\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u306e\u6700\u5927\u306e\u6df1\u3055\u3067\u3059\u3002<\/li>\n<li>N \u500b\u306e\u30ce\u30fc\u30c9\u3092\u6301\u3064\u4e8c\u5206\u6728\u306b\u306f N-1 \u500b\u306e\u30a8\u30c3\u30b8\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ol>\n<h2>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u5185\u90e8\u69cb\u9020: \u305d\u306e\u4ed5\u7d44\u307f<\/h2>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u5185\u90e8\u69cb\u9020\u306f\u3001\u305d\u306e\u30ce\u30fc\u30c9\u3068\u305d\u306e\u63a5\u7d9a\u306b\u57fa\u3065\u3044\u3066\u3044\u307e\u3059\u3002\u901a\u5e38\u3001\u5404\u30ce\u30fc\u30c9\u306b\u306f\u30c7\u30fc\u30bf\u8981\u7d20\u3068\u305d\u306e\u5de6\u53f3\u306e\u5b50\u3078\u306e\u53c2\u7167 (\u30dd\u30a4\u30f3\u30bf) \u304c\u542b\u307e\u308c\u307e\u3059\u3002\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u8d70\u67fb\u306b\u306f\u3001\u9806\u5e8f\u3069\u304a\u308a\u306e\u8d70\u67fb\u3001\u4e8b\u524d\u9806\u5e8f\u306e\u8d70\u67fb\u3001\u304a\u3088\u3073\u9806\u5e8f\u5f8c\u306e\u8d70\u67fb\u306a\u3069\u306e\u3055\u307e\u3056\u307e\u306a\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u542b\u307e\u308c\u3001\u305d\u308c\u305e\u308c\u304c\u30ce\u30fc\u30c9\u3092\u8a2a\u554f\u3059\u308b\u7570\u306a\u308b\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc \u30c8\u30e9\u30d0\u30fc\u30b5\u30eb \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0:<\/h3>\n<ol>\n<li>\u9806\u5e8f\u30c8\u30e9\u30d0\u30fc\u30b5\u30eb: \u5de6\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u3001\u6b21\u306b\u30eb\u30fc\u30c8\u3001\u6700\u5f8c\u306b\u53f3\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u3092\u8a2a\u554f\u3057\u307e\u3059\u3002<\/li>\n<li>\u4e8b\u524d\u9806\u5e8f\u30c8\u30e9\u30d0\u30fc\u30b5\u30eb: \u30eb\u30fc\u30c8\u3001\u6b21\u306b\u5de6\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u3001\u6700\u5f8c\u306b\u53f3\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u3092\u8a2a\u554f\u3057\u307e\u3059\u3002<\/li>\n<li>\u4e8b\u5f8c\u30c8\u30e9\u30d0\u30fc\u30b5\u30eb: \u5de6\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u3001\u6b21\u306b\u53f3\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u3001\u6700\u5f8c\u306b\u30eb\u30fc\u30c8\u3092\u8a2a\u554f\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<h2>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u4e3b\u8981\u306a\u6a5f\u80fd\u306e\u5206\u6790<\/h2>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306b\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u3055\u307e\u3056\u307e\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u4fa1\u5024\u306e\u3042\u308b\u3044\u304f\u3064\u304b\u306e\u91cd\u8981\u306a\u6a5f\u80fd\u304c\u5099\u308f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u52b9\u7387\u7684\u306a\u691c\u7d22<\/strong>: \u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u7279\u306b\u30c4\u30ea\u30fc\u306e\u30d0\u30e9\u30f3\u30b9\u304c\u53d6\u308c\u3066\u3044\u308b\u5834\u5408\u306b\u3001\u52b9\u7387\u7684\u306a\u691c\u7d22\u64cd\u4f5c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u30d0\u30e9\u30f3\u30b9\u306e\u53d6\u308c\u305f\u4e8c\u5206\u6728\u3067\u306e\u691c\u7d22\u306e\u6642\u9593\u8a08\u7b97\u91cf\u306f O(log N) \u3067\u3042\u308a\u3001\u914d\u5217\u3084\u30ea\u30f3\u30af \u30ea\u30b9\u30c8\u3067\u306e\u7dda\u5f62\u691c\u7d22\u3088\u308a\u3082\u306f\u308b\u304b\u306b\u9ad8\u901f\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7d20\u65e9\u3044\u633f\u5165\u3068\u524a\u9664<\/strong>: \u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306b\u3088\u308a\u3001\u6bd4\u8f03\u7684\u9ad8\u901f\u306a\u633f\u5165\u304a\u3088\u3073\u524a\u9664\u64cd\u4f5c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u30c4\u30ea\u30fc\u306e\u30d0\u30e9\u30f3\u30b9\u304c\u4fdd\u305f\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u3053\u308c\u3089\u306e\u64cd\u4f5c\u306e\u6642\u9593\u8a08\u7b97\u91cf\u306f O(log N) \u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u4e8c\u5206\u63a2\u7d22\u6728 (BST)<\/strong>: \u4e8c\u5206\u63a2\u7d22\u6728\u306f\u3001\u3059\u3079\u3066\u306e\u30ce\u30fc\u30c9\u306b\u3064\u3044\u3066\u3001\u5de6\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u306e\u3059\u3079\u3066\u306e\u30ce\u30fc\u30c9\u304c\u305d\u306e\u30ce\u30fc\u30c9\u3088\u308a\u5c0f\u3055\u3044\u5024\u3092\u6301\u3061\u3001\u53f3\u5074\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u306e\u3059\u3079\u3066\u306e\u30ce\u30fc\u30c9\u304c\u305d\u306e\u30ce\u30fc\u30c9\u3088\u308a\u5927\u304d\u3044\u5024\u3092\u6301\u3064\u3068\u3044\u3046\u7279\u6027\u306b\u5f93\u3046\u4e8c\u5206\u6728\u306e\u4e00\u7a2e\u3067\u3059\u3002\u3053\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3088\u308a\u3001\u8981\u7d20\u306e\u52b9\u7387\u7684\u306a\u691c\u7d22\u3001\u633f\u5165\u3001\u524a\u9664\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u512a\u5148\u30ad\u30e5\u30fc<\/strong>: \u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3092\u4f7f\u7528\u3057\u3066\u512a\u5148\u5ea6\u30ad\u30e5\u30fc\u3092\u5b9f\u88c5\u3059\u308b\u3068\u3001\u512a\u5148\u5ea6\u306e\u9ad8\u3044\u8981\u7d20\u306b\u8fc5\u901f\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u4e8c\u5206\u6728\u306e\u7a2e\u985e<\/h2>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u7a2e\u985e\u304c\u3042\u308a\u3001\u305d\u308c\u305e\u308c\u304c\u7279\u5b9a\u306e\u76ee\u7684\u3092\u679c\u305f\u3059\u3088\u3046\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u30bf\u30a4\u30d7\u3092\u3044\u304f\u3064\u304b\u793a\u3057\u307e\u3059\u3002<\/p>\n<h3>1. \u5b8c\u5168\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc (\u9069\u5207\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc)<\/h3>\n<p>\u5b8c\u5168\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3067\u306f\u3001\u3059\u3079\u3066\u306e\u975e\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u306b 2 \u3064\u306e\u5b50\u304c\u3042\u308a\u3001\u3059\u3079\u3066\u306e\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u306f\u540c\u3058\u30ec\u30d9\u30eb\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>2. \u5b8c\u5168\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc<\/h3>\n<p>\u5b8c\u5168\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3068\u306f\u3001\u304a\u305d\u3089\u304f\u6700\u5f8c\u306e\u30ec\u30d9\u30eb\u3092\u9664\u304f\u3059\u3079\u3066\u306e\u30ec\u30d9\u30eb\u304c\u57cb\u3081\u3089\u308c\u3001\u3059\u3079\u3066\u306e\u30ce\u30fc\u30c9\u304c\u53ef\u80fd\u306a\u9650\u308a\u5de6\u306b\u3042\u308b\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3067\u3059\u3002<\/p>\n<h3>3. \u5b8c\u74a7\u306a\u4e8c\u5206\u6728<\/h3>\n<p>\u5b8c\u5168\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3068\u306f\u3001\u3059\u3079\u3066\u306e\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u304c\u540c\u3058\u30ec\u30d9\u30eb\u306b\u3042\u308a\u3001\u3059\u3079\u3066\u306e\u5185\u90e8\u30ce\u30fc\u30c9\u306b 2 \u3064\u306e\u5b50\u304c\u3042\u308b\u5b8c\u5168\u306a\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3067\u3059\u3002<\/p>\n<h3>4. \u30d0\u30e9\u30f3\u30b9\u306e\u53d6\u308c\u305f\u4e8c\u5206\u6728<\/h3>\n<p>\u30d0\u30e9\u30f3\u30b9\u306e\u3068\u308c\u305f\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3068\u306f\u3001\u4efb\u610f\u306e\u30ce\u30fc\u30c9\u306e\u5de6\u53f3\u306e\u30b5\u30d6\u30c4\u30ea\u30fc\u9593\u306e\u6df1\u3055\u306e\u5dee\u304c 1 \u3092\u8d85\u3048\u306a\u3044\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3067\u3059\u3002<\/p>\n<h3>5. \u5909\u6027\u3057\u305f\uff08\u75c5\u7684\u306a\uff09\u4e8c\u5206\u6728<\/h3>\n<p>\u7e2e\u9000\u3057\u305f\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3067\u306f\u3001\u5404\u30ce\u30fc\u30c9\u306b\u306f\u5b50\u304c 1 \u3064\u3060\u3051\u3042\u308a\u307e\u3059\u3002\u57fa\u672c\u7684\u306b\u3001\u30ea\u30f3\u30af\u3055\u308c\u305f\u30ea\u30b9\u30c8\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<h2>Binary Tree \u306e\u4f7f\u7528\u65b9\u6cd5: \u554f\u984c\u3068\u305d\u306e\u89e3\u6c7a\u7b56<\/h2>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf \u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2 \u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u306e\u3055\u307e\u3056\u307e\u306a\u5206\u91ce\u3067\u5fdc\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u4f7f\u7528\u6cd5\u3068\u305d\u308c\u306b\u95a2\u9023\u3059\u308b\u554f\u984c\u306b\u306f\u6b21\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>1. \u691c\u7d22\u3068\u4e26\u3079\u66ff\u3048\u306e\u305f\u3081\u306e\u4e8c\u5206\u63a2\u7d22\u30c4\u30ea\u30fc:<\/h3>\n<p>\u4e8c\u5206\u63a2\u7d22\u30c4\u30ea\u30fc (BST) \u306f\u3001\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u691c\u7d22\u304a\u3088\u3073\u4e26\u3079\u66ff\u3048\u308b\u305f\u3081\u306b\u4e00\u822c\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u305f\u3060\u3057\u3001BST \u306e\u30d0\u30e9\u30f3\u30b9\u304c\u5d29\u308c\u308b\u3068\u30c4\u30ea\u30fc\u306b\u6b6a\u307f\u304c\u751f\u3058\u3001\u691c\u7d22\u304a\u3088\u3073\u633f\u5165\u64cd\u4f5c\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c O(N) \u306b\u4f4e\u4e0b\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u8efd\u6e1b\u3059\u308b\u305f\u3081\u306b\u3001AVL \u30c4\u30ea\u30fc\u3084\u8d64\u9ed2\u30c4\u30ea\u30fc\u306a\u3069\u306e\u6280\u8853\u3092\u4f7f\u7528\u3057\u3066\u30d0\u30e9\u30f3\u30b9\u3092\u7dad\u6301\u3057\u307e\u3059\u3002<\/p>\n<h3>2. \u5f0f\u306e\u89e3\u6790:<\/h3>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3001\u6570\u5f0f\u3092\u89e3\u6790\u304a\u3088\u3073\u8a55\u4fa1\u3067\u304d\u307e\u3059\u3002\u6f14\u7b97\u5b50\u306f\u5185\u90e8\u30ce\u30fc\u30c9\u306b\u683c\u7d0d\u3055\u308c\u3001\u30aa\u30da\u30e9\u30f3\u30c9\u306f\u30ea\u30fc\u30d5 \u30ce\u30fc\u30c9\u306b\u683c\u7d0d\u3055\u308c\u308b\u305f\u3081\u3001\u30c8\u30e9\u30d0\u30fc\u30b5\u30eb \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u4f7f\u7528\u3057\u305f\u52b9\u7387\u7684\u306a\u8a55\u4fa1\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>3. \u30c7\u30fc\u30bf\u5727\u7e2e\u306e\u305f\u3081\u306e\u30cf\u30d5\u30de\u30f3\u7b26\u53f7\u5316:<\/h3>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u4e00\u7a2e\u3067\u3042\u308b\u30cf\u30d5\u30de\u30f3 \u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306f\u30c7\u30fc\u30bf\u5727\u7e2e\u306b\u4f7f\u7528\u3055\u308c\u3001\u983b\u7e41\u306b\u51fa\u73fe\u3059\u308b\u6587\u5b57\u306b\u77ed\u3044\u30b3\u30fc\u30c9\u3092\u5272\u308a\u5f53\u3066\u3066\u5727\u7e2e\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002<\/p>\n<h3>4. \u30b0\u30e9\u30d5 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc \u30c8\u30e9\u30d0\u30fc\u30b5\u30eb:<\/h3>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306f\u3001\u30c4\u30ea\u30fc\u72b6\u306e\u8d70\u67fb\u3092\u901a\u3058\u3066\u30b0\u30e9\u30d5\u69cb\u9020\u3092\u8868\u3059\u3053\u3068\u306b\u3088\u308a\u3001\u6df1\u3055\u512a\u5148\u691c\u7d22 (DFS) \u3084\u5e45\u512a\u5148\u691c\u7d22 (BFS) \u306a\u3069\u306e\u30b0\u30e9\u30d5 \u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>5. \u512a\u5148\u30ad\u30e5\u30fc:<\/h3>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u4e00\u7a2e\u3067\u3042\u308b\u30d0\u30a4\u30ca\u30ea \u30d2\u30fc\u30d7\u306f\u3001\u512a\u5148\u30ad\u30e5\u30fc\u306e\u5b9f\u88c5\u306b\u4f7f\u7528\u3055\u308c\u3001\u6700\u3082\u512a\u5148\u5ea6\u306e\u9ad8\u3044\u8981\u7d20\u306e\u52b9\u7387\u7684\u306a\u633f\u5165\u3068\u62bd\u51fa\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002<\/p>\n<h2>\u4e3b\u306a\u7279\u5fb4\u3068\u985e\u4f3c\u7528\u8a9e\u3068\u306e\u6bd4\u8f03<\/h2>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3068\u4ed6\u306e\u95a2\u9023\u30c7\u30fc\u30bf\u69cb\u9020\u306e\u6bd4\u8f03\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u30c7\u30fc\u30bf\u69cb\u9020<\/th>\n<th>\u4e3b\u306a\u7279\u9577<\/th>\n<th>\u691c\u7d22<\/th>\n<th>\u633f\u5165<\/th>\n<th>\u524a\u9664<\/th>\n<th>\u7a7a\u9593\u306e\u8907\u96d1\u3055<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u4e8c\u5206\u6728<\/td>\n<td>\u968e\u5c64\u69cb\u9020\u30012\u4eba\u306e\u5b50\u4f9b<\/td>\n<td>O(log N)<\/td>\n<td>O(log N)<\/td>\n<td>O(log N)<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u30ea\u30f3\u30af\u3055\u308c\u305f\u30ea\u30b9\u30c8<\/td>\n<td>\u7dda\u5f62\u3001\u6b21\u306e 1 \u3064\u306e\u30ce\u30fc\u30c9<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<td>\u25cb(1)<\/td>\n<td>\u25cb(1)<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u914d\u5217<\/td>\n<td>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u4ed8\u304d\u3001\u56fa\u5b9a\u30b5\u30a4\u30ba<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u30cf\u30c3\u30b7\u30e5\u8868<\/td>\n<td>Key-Value \u30de\u30c3\u30d4\u30f3\u30b0\u3001\u9ad8\u901f\u30a2\u30af\u30bb\u30b9<\/td>\n<td>\u25cb(1)<\/td>\n<td>\u25cb(1)<\/td>\n<td>\u25cb(1)<\/td>\n<td>\u306e\u4e0a\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Binary Tree\u306b\u95a2\u3059\u308b\u5c06\u6765\u306e\u5c55\u671b\u3068\u6280\u8853<\/h2>\n<p>\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u304c\u9032\u6b69\u3057\u3066\u3082\u3001\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u91cd\u8981\u6027\u306f\u4eca\u5f8c\u3082\u7d9a\u304f\u3068\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u30c7\u30fc\u30bf\u51e6\u7406\u3068\u6700\u9069\u5316\u306e\u30cb\u30fc\u30ba\u304c\u9ad8\u307e\u308b\u306b\u3064\u308c\u3001\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc \u30d9\u30fc\u30b9\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306f\u3055\u307e\u3056\u307e\u306a\u5206\u91ce\u3067\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u7d9a\u3051\u308b\u3067\u3057\u3087\u3046\u3002\u30d0\u30e9\u30f3\u30b9\u8abf\u6574\u6280\u8853\u3068\u6700\u9069\u5316\u6226\u7565\u304c\u3055\u3089\u306b\u9032\u6b69\u3059\u308b\u3068\u3001\u73fe\u5b9f\u4e16\u754c\u306e\u30b7\u30ca\u30ea\u30aa\u306b\u304a\u3051\u308b\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u9069\u7528\u6027\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306e\u4f7f\u7528\u65b9\u6cd5\u3001\u307e\u305f\u306f\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3068\u306e\u95a2\u9023\u4ed8\u3051\u65b9\u6cd5<\/h2>\n<p>\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u65b9\u6cd5\u3067\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3092\u6d3b\u7528\u3057\u3066\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u6c7a\u5b9a\u3092\u6700\u9069\u5316\u3067\u304d\u307e\u3059\u3002\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u8907\u6570\u306e\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u9593\u3067\u8ca0\u8377\u3092\u5206\u6563\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8981\u6c42\u3092\u52b9\u7387\u7684\u306b\u5206\u6563\u3067\u304d\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3092\u30ad\u30e3\u30c3\u30b7\u30e5 \u30e1\u30ab\u30cb\u30ba\u30e0\u3067\u4f7f\u7528\u3057\u3066\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u52b9\u679c\u7684\u306b\u7ba1\u7406\u3057\u3001\u983b\u7e41\u306b\u8981\u6c42\u3055\u308c\u308b\u30ea\u30bd\u30fc\u30b9\u306e\u5fdc\u7b54\u6642\u9593\u3092\u77ed\u7e2e\u3067\u304d\u307e\u3059\u3002\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc \u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u3092\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\u3068\u3057\u3066\u7de8\u6210\u3059\u308b\u3053\u3068\u3067\u3001OneProxy \u306e\u3088\u3046\u306a\u30d7\u30ed\u30d0\u30a4\u30c0\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u5bfe\u3057\u3066\u30b9\u30e0\u30fc\u30ba\u3067\u9ad8\u901f\u306a\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d3\u30b9\u3092\u4fdd\u8a3c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u30ea\u30f3\u30af<\/h2>\n<p>\u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc\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<ul>\n<li><a href=\"https:\/\/www.geeksforgeeks.org\/binary-tree-data-structure\/\" target=\"_new\" rel=\"noopener nofollow\">GeeksforGeeks \u2013 \u30d0\u30a4\u30ca\u30ea \u30c4\u30ea\u30fc<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Binary_tree\" target=\"_new\" rel=\"noopener nofollow\">\u30a6\u30a3\u30ad\u30da\u30c7\u30a3\u30a2 \u2013 \u4e8c\u5206\u6728<\/a><\/li>\n<li><a href=\"https:\/\/mitpress.mit.edu\/books\/introduction-algorithms-third-edition\" target=\"_new\" rel=\"noopener nofollow\">\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u5165\u9580 (\u66f8\u7c4d)<\/a> \u30c8\u30fc\u30de\u30b9\u30fbH\u30fb\u30b3\u30fc\u30e1\u30f3\u3001\u30c1\u30e3\u30fc\u30eb\u30ba\u30fbE\u30fb\u30e9\u30a4\u30b6\u30fc\u30bd\u30f3\u3001\u30ed\u30ca\u30eb\u30c9\u30fbL\u30fb\u30ea\u30d9\u30b9\u30c8\u3001\u30af\u30ea\u30d5\u30a9\u30fc\u30c9\u30fb\u30b9\u30bf\u30a4\u30f3\u8457\u3002<\/li>\n<\/ul>","protected":false},"featured_media":467732,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-476022","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Binary Tree: A Comprehensive Overview<\/mark>","faq_items":[{"question":"What is a Binary Tree?","answer":"<p>A Binary Tree is a fundamental data structure used in computer science and mathematics to represent hierarchical relationships between elements. It consists of nodes connected by edges, forming a tree-like structure, where each node can have at most two children, referred to as the left child and the right child.<\/p>"},{"question":"Who introduced the concept of Binary Trees?","answer":"<p>The concept of Binary Trees was introduced by the renowned computer scientist John von Neumann while working on the EDVAC computer project in 1945.<\/p>"},{"question":"What are the key features of Binary Trees?","answer":"<p>Binary Trees offer several key features, including efficient searching, quick insertion and deletion, hierarchical structure, and various traversal algorithms like in-order, pre-order, and post-order traversal.<\/p>"},{"question":"What types of Binary Trees exist?","answer":"<p>Several types of Binary Trees exist, each serving different purposes. Some common types include Full Binary Trees, Complete Binary Trees, Perfect Binary Trees, Balanced Binary Trees, and Degenerate (Pathological) Binary Trees.<\/p>"},{"question":"How are Binary Trees used in computer science?","answer":"<p>Binary Trees find diverse applications, such as searching and sorting using Binary Search Trees, expression parsing, data compression with Huffman coding, graph algorithms like Depth-First Search (DFS) and Breadth-First Search (BFS), and priority queues using Binary Heaps.<\/p>"},{"question":"What is the future outlook for Binary Trees?","answer":"<p>As technology advances, Binary Trees will continue to play a crucial role in various fields. Advancements in balancing techniques and optimization strategies are expected to further improve their performance and applicability.<\/p>"},{"question":"How can proxy servers benefit from using Binary Trees?","answer":"<p>Proxy servers can leverage Binary Trees for load balancing among multiple servers and efficient caching mechanisms. Organizing the proxy infrastructure as a Binary Tree can ensure smooth and fast proxy services for clients.<\/p>"},{"question":"Where can I find more information about Binary Trees?","answer":"<p>For more information about Binary Trees, you can refer to resources like GeeksforGeeks and Wikipedia. Additionally, the book \"Introduction to Algorithms\" provides in-depth coverage of this topic.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/476022","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\/476022\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media\/467732"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media?parent=476022"}],"curies":[{"name":"\u3046\u30fc\u3093","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}