{"id":376,"date":"2023-05-05T15:21:16","date_gmt":"2023-05-05T07:21:16","guid":{"rendered":"https:\/\/blog.taiyang.space\/?p=376"},"modified":"2023-05-05T15:21:16","modified_gmt":"2023-05-05T07:21:16","slug":"%e7%ac%ac7%e7%ab%a0-%e6%9f%a5%e6%89%be","status":"publish","type":"post","link":"https:\/\/blog.taiyang.space\/?p=376","title":{"rendered":"\u7b2c7\u7ae0-\u67e5\u627e"},"content":{"rendered":"<h2>7.1 \u67e5\u627e\u7684\u6982\u5ff5<\/h2>\n<p>\u95ee\u9898\uff1a\u5728\u54ea\u627e\uff1f<\/p>\n<p>\u2014\u2014\u67e5\u627e\u8868<\/p>\n<p>&nbsp;<\/p>\n<p>\u67e5\u627e\u8868\u662f\u7531\u540c\u4e00\u7c7b\u578b\u7684\u6570\u636e\u5143\u7d20\uff08\u6216\u7eaa\u5f8b\uff09\u6784\u6210\u7684\u96c6\u5408\u3002\u7531\u4e8e\u201c\u96c6\u5408\u201d\u4e2d\u7684\u6570\u636e\u5143\u7d20\u4e4b\u95f4\u5b58\u5728\u7740\u677e\u6563\u7684\u5173\u7cfb\uff0c\u56e0\u6b64\u67e5\u627e\u8868\u662f\u4e00\u79cd\u5e94\u7528\u7075\u4fbf\u7684\u7ed3\u6784<\/p>\n<p>&nbsp;<\/p>\n<p>\u4ec0\u4e48\u662f\u67e5\u627e\uff1a\u6839\u636e\u7ed9\u5b9a\u7684\u67d0\u4e2a\u503c\uff0c\u5728\u67e5\u627e\u8868\u4e2d\u786e\u5b9a\u4e00\u4e2a\u5176\u5173\u952e\u5b57\u7b49\u4e8e\u7ed9\u5b9a\u503c\u7684\u6570\u636e\u5143\u7d20\u6216\uff08\u8bb0\u5f55\uff09<\/p>\n<p>\u5173\u952e\u5b57\uff1a\u7528\u6765\u6807\u8bc6\u4e00\u4e2a\u6570\u636e\u5143\u7d20\uff08\u6216\u8bb0\u5f55\uff09\u7684\u67d0\u4e2a\u6570\u636e\u9879\u7684\u503c<\/p>\n<ul>\n<li>\u4e3b\u5173\u952e\u5b57\uff1a\u53ef\u552f\u4e00\u5730\u6807\u8bc6\u4e00\u4e2a\u8bb0\u5f55\u7684\u5173\u952e\u5b57\u662f\u4e3b\u5173\u952e\u5b57<\/li>\n<li>\u6b21\u5173\u952e\u5b57\uff1a\u53cd\u4e4b\uff0c\u7528\u4ee5\u8bc6\u522b\u82e5\u5e72\u8bb0\u5f55\u7684\u5173\u952e\u5b57\u662f\u6b21\u5173\u952e\u5b57<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u67e5\u627e\u8868\u53ef\u5206\u4e3a\u4e24\u7c7b\uff1a<\/p>\n<ul>\n<li>\u9759\u6001\u67e5\u627e\u8868\uff1a\u4ec5\u4f5c\u201c\u67e5\u8be2\u201d\uff08\u68c0\u7d22\uff09\u64cd\u4f5c\u7684\u67e5\u627e\u8868<\/li>\n<li>\u52a8\u6001\u67e5\u627e\u8868\uff1a\u4f5c\u201c\u63d2\u5165\u201d\u548c\u201c\u5220\u9664\u201d\u64cd\u4f5c\u7684\u67e5\u627e\u8868<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u67e5\u627e\u7b97\u6cd5\u7684\u8bc4\u4ef7\u6307\u6807\uff1a\u5173\u952e\u5b57\u7684\u5e73\u5747\u6bd4\u8f83\u6b21\u6570\uff0c\u4e5f\u79f0\u5e73\u5747\u67e5\u627e\u957f\u5ea6 ASL\uff08Average Search Length\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441155.svg\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<ul>\n<li>n\uff1a\u8bb0\u5f55\u7684\u4e2a\u6570<\/li>\n<li>pi\uff1a\u67e5\u627e\u7684\u7b2c i \u4e2a\u8bb0\u5f55\u7684\u963f\u6982\u7387\uff08\u901a\u5e38\u8ba4\u4e3api=1\/n\uff09<\/li>\n<li>ci\uff1a\u627e\u5230\u7b2c i \u4e2a\u8bb0\u5f55\u6240\u9700\u7684\u6bd4\u8f83\u6b21\u6570<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>7.2 \u7ebf\u6027\u8868\u7684\u67e5\u627e<\/h2>\n<h3>7.2.1 \u987a\u5e8f\u67e5\u627e<\/h3>\n<p>\u5e94\u7528\u8303\u56f4\uff1a<\/p>\n<ul>\n<li>\u987a\u5e8f\u8868\u6216\u7ebf\u6027\u8868\u8868\u793a\u7684\u9759\u6001\u67e5\u627e\u8868<\/li>\n<li>\u8868\u5185\u5143\u7d20\u4e4b\u95f4<strong>\u65e0\u5e8f<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u987a\u5e8f\u8868\u7684\u8868\u793a\uff1a<\/p>\n<p>\u6570\u636e\u5143\u7d20\u7c7b\u578b\u5b9a\u4e49\uff1a<\/p>\n<pre><code class=\"language-cpp\" lang=\"cpp\">typedef struct {\n\tkeyType key;\t\/\/ \u5173\u952e\u5b57\n\t\/\/ \u5176\u4ed6\u6570\u636e\u57df\n} ElemType;\n\ntypedef struct {\n\tElemType* elem;\t\t\/\/ \u5b58\u50a8\u7a7a\u95f4\u57fa\u5740\n\tint length;\t\t\t\/\/ \u5f53\u524d\u957f\u5ea6\n} SequenSearchList;\n<\/code><\/pre>\n<p>\u4e3e\u4f8b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441157.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<pre><code class=\"language-cpp\" lang=\"cpp\">\/*******************************************************************************************************************************\n * @description\uff1a\u987a\u5e8f\u67e5\u627e\n * @param\uff1alist\n * @param\uff1akey\n * @return\uff1a\u627e\u5230\u8fd4\u56de\u4e0b\u6807\uff0c\u6ca1\u627e\u5230\u8fd4\u56de0\n *\/\nint searchSequenList(SequenSearchList list, keyType key)\n{\n\tfor (int i = list.length; i &gt;= 1; --i) {\n\t\tif (list.elem[i].key == key) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn 0;\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u6539\u8fdb\uff1a\u628a\u5f85\u67e5\u5173\u952e\u5b57\u5b58\u5165\u8868\u5934\uff08\u201c\u54e8\u5175\u201d\u3001\u201c\u76d1\u89c6\u54e8\u201d\uff09\uff0c\u4ece\u540e\u9762\u9010\u4e2a\u6bd4\u8f83\uff0c\u53ef\u514d\u53bb\u67e5\u627e\u8fc7\u7a0b\u4e2d\u6bcf\u4e00\u6b65\u90fd\u8981\u68c0\u6d4b\u662f\u5426\u67e5\u627e\u5b8c\u6bd5\uff0c\u52a0\u5feb\u901f\u5ea6<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441159.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<ul>\n<li>\u65f6\u95f4\u590d\u6742\u5ea6\uff1aO(n)<\/li>\n<li>ASL(n) = (n+1)\/2<\/li>\n<li>\u7a7a\u95f4\u590d\u6742\u5ea6\uff1a\u4e00\u4e2a\u8f85\u52a9\u7a7a\u95f4 O(1)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u4f18\u70b9\uff1a\u7b97\u6cd5\u7b80\u5355\uff0c\u903b\u8f91\u6b21\u5e8f\u65e0\u8981\u6c42\uff0c\u4e14\u4e0d\u540c\u5b58\u50a8\u7ed3\u6784\u5747\u9002\u7528<\/p>\n<p>\u7f3a\u70b9\uff1aASL\u592a\u957f\uff0c\u65f6\u95f4\u6548\u7387\u592a\u4f4e<\/p>\n<p>&nbsp;<\/p>\n<h3>7.2.2 \u6298\u534a\u67e5\u627e<\/h3>\n<p>\u6bcf\u6b21\u5c06\u5f85\u67e5\u8bb0\u5f55\u6240\u5728\u533a\u95f4\u7f29\u5c0f\u4e00\u534a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441158.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h4>\u975e\u9012\u5f52\u7b97\u6cd5<\/h4>\n<ul>\n<li>\u8bbe\u8868\u957f\u4e3an\uff0clow\u3001high\u548cmid\u5206\u522b\u6307\u5411\u5f85\u67e5\u5143\u7d20\u6240\u5728\u533a\u95f4\u7684\u4e0a\u754c\u3001\u4e0b\u754c\u548c\u4e2d\u70b9\uff0ckey\u4e3a\u7ed9\u5b9a\u7684\u8981\u67e5\u627e\u7684\u503c<\/li>\n<li>\u521d\u59cb\u65f6\uff0c\u4ee4low=1\uff0chigh=n\uff0cmid=(low + high) \/ 2<\/li>\n<li>\u8ba9k\u4e0emid\u6307\u5411\u7684\u8bb0\u5f55\u6bd4\u8f83<\/li>\n<li>\n<ul>\n<li>\u82e5list.elem[mid].key == key\uff0c\u67e5\u627e\u6210\u529f<\/li>\n<li>\u82e5list.elem[mid].key &gt; key\uff0c\u5219high = mid &#8211; 1<\/li>\n<li>\u82e5list.elem[mid].key &lt; key\uff0c\u5219low = mid + 1<\/li>\n<\/ul>\n<\/li>\n<li>\u91cd\u590d\u4e0a\u8ff0\u64cd\u4f5c\uff0c\u76f4\u81f3low&gt;high\u65f6\uff0c\u67e5\u627e\u5931\u8d25<\/li>\n<\/ul>\n<pre><code class=\"language-cpp\" lang=\"cpp\">\/*******************************************************************************************************************************\n * @description\uff1a\u6298\u534a\u67e5\u627e\n * @param\uff1alist\n * @param\uff1akey\n * @return\uff1a\n *\/\nint binarySearchList(SequenSearchList list, keyType key)\n{\n\tint low = 1;\n\tint high = list.length;\n\tint mid = 0;\n\twhile (low &lt;= high) {\n\t\tmid = (low + high) \/ 2;\n\t\tif (list.elem[mid].key == key) {\n\t\t\treturn mid;\n\t\t}\n\t\telse if (list.elem[mid].key &gt; key) {\n\t\t\thigh = mid - 1;\n\t\t}\n\t\telse {\n\t\t\tlow = mid + 1;\n\t\t}\n\t}\n\treturn 0;\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h4>\u9012\u5f52\u7b97\u6cd5<\/h4>\n<pre><code class=\"language-cpp\" lang=\"cpp\">\/*******************************************************************************************************************************\n * @description\uff1a\u6298\u534a\u67e5\u627e--\u9012\u5f52\u7b97\u6cd5\n * @param\uff1alist\n * @param\uff1akey\n * @param\uff1alow\n * @param\uff1ahigh\n * @return\uff1a\u627e\u5230\u8fd4\u56de\u4e0b\u6807\uff0c\u6ca1\u627e\u5230\u8fd4\u56de0\n *\/\nint binarySearchList_recursion(SequenSearchList list, keyType key, int low, int high)\n{\n\tif (low &gt; high) {\n\t\treturn 0;\n\t}\n\tint mid = (low + high) \/ 2;\n\tif (list.elem[mid].key == key) {\n\t\treturn mid;\t\/\/ \u9012\u5f52\u51fa\u53e3\n\t}\n\telse if (list.elem[mid].key &gt; key) {\n\t\treturn binarySearchList_recursion(list, key, low, mid - 1);\n\t}\n\telse {\n\t\treturn binarySearchList_recursion(list, key, mid + 1, high);\n\t}\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h4>\u5224\u5b9a\u6811<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441164.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p>\u6298\u534a\u67e5\u627e\u4f18\u7f3a\u70b9\uff1a<\/p>\n<ul>\n<li>\u4f18\u70b9\uff1a\u6548\u7387\u6bd4\u987a\u5e8f\u67e5\u627e\u9ad8\uff0c\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a O(logn)      ASL=log(2, n+1)<\/li>\n<li>\u7f3a\u70b9\uff1a\u53ea\u9002\u7528\u4e8e<strong>\u6709\u5e8f\u8868<\/strong>\uff0c\u4e14\u53d7\u9650\u4e8e<strong>\u987a\u5e8f\u5b58\u50a8\u7ed3\u6784<\/strong>\uff08\u5bf9\u7ebf\u6027\u8868\u65e0\u6548\uff09<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>7.2.3 \u5206\u5757\u67e5\u627e<\/h3>\n<p>\u6761\u4ef6\uff1a<\/p>\n<ol start=\"\">\n<li>\u5c06\u8868\u5206\u6210\u51e0\u5757\uff0c\u4e14\u8868\u6216\u8005\u6709\u5e8f\uff0c\u6216\u8005\u5206\u5757\u6709\u5e8f\uff0c\u82e5 i &lt; j\uff0c\u5219\u7b2cj\u5757\u4e2d\u6240\u6709\u8bb0\u5f55\u7684\u5173\u952e\u5b57\u5747\u5927\u4e8e\u7b2c i \u5757\u4e2d\u7684\u6700\u5927\u5173\u952e\u5b57<\/li>\n<li>\u5efa\u7acb\u201c\u7d22\u5f15\u8868\u201d\uff08\u6bcf\u4e2a\u7ed3\u70b9\u542b\u6709\u6700\u5927\u5173\u952e\u5b57\u5b57\u57df\u548c\u6307\u5411\u672c\u5757\u7b2c\u4e00\u4e2a\u7ed3\u70b9\u7684\u6307\u9488\uff0c\u4e14\u6309\u5173\u952e\u5b57\u6709\u5e8f\uff09<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441167.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>\u6027\u80fd\u5206\u6790<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441294.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<ul>\n<li>\u4f18\u70b9\uff1a\u63d2\u5165\u548c\u5220\u9664\u6bd4\u8f83\u5bb9\u6613\uff0c\u65e0\u9700\u8fdb\u884c\u5927\u91cf\u79fb\u52a8<\/li>\n<li>\u7f3a\u70b9\uff1a\u8981\u589e\u52a0\u4e00\u4e2a\u7d22\u5f15\u8868\u7684\u5b58\u50a8\u7a7a\u95f4\u5e76\u5bf9\u521d\u59cb\u7d22\u5f15\u8868\u8fdb\u884c\u6392\u5e8f\u8fd0\u7b97<\/li>\n<li>\u9002\u7528\u60c5\u51b5\uff1a\u5982\u679c\u7ebf\u6027\u8868\u65e2\u8981\u5feb\u901f\u67e5\u627e\u53c8\u7ecf\u5e38\u52a8\u6001\u53d8\u5316\uff0c\u5219\u53ef\u91c7\u7528\u5206\u5757\u67e5\u627e<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>7.2.4 \u4e09\u79cd\u67e5\u627e\u6bd4\u8f83<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441033.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h2>7.3 \u6811\u8868\u7684\u67e5\u627e<\/h2>\n<p>\u5f53\u8868\u63d2\u5165\u3001\u5220\u9664\u64cd\u4f5c\u9891\u7e41\u65f6\uff0c\u4e3a\u7ef4\u62a4\u8868\u7684\u6709\u5e8f\u6027\uff0c\u9700\u8981\u79fb\u52a8\u8868\u4e2d\u5f88\u591a\u8bb0\u5f55\u3002<\/p>\n<p>\u6539\u7528\u52a8\u6001\u67e5\u627e\u8868\u2014\u2014\u51e0\u79cd\u7279\u6b8a\u7684\u6811<\/p>\n<ul>\n<li><strong>\u4e8c\u53c9\u6392\u5e8f\u6811<\/strong><\/li>\n<li><strong>\u5e73\u8861\u4e8c\u53c9\u6811<\/strong><\/li>\n<li>\u7ea2\u9ed1\u6811<\/li>\n<li>B-\u6811<\/li>\n<li>B+\u6811<\/li>\n<li>\u952e\u6811<\/li>\n<\/ul>\n<p>\u8868\u7ed3\u6784\u5728\u67e5\u627e\u8fc7\u7a0b\u4e2d\u52a8\u6001\u751f\u6210\uff0c\u5bf9\u4e8e\u7ed9\u5b9a\u503ckey\u82e5\u8868\u4e2d\u5b58\u5728\uff0c\u5219\u6210\u529f\u8fd4\u56de\uff1b\u5426\u5219\uff0c\u63d2\u5165\u5173\u952e\u5b57\u7b49\u4e8ekey\u7684\u8bb0\u5f55<\/p>\n<p>&nbsp;<\/p>\n<h3>7.3.1 \u4e8c\u53c9\u6392\u5e8f\u6811<\/h3>\n<p>\u4e8c\u53c9\u6392\u5e8f\u6811\uff08Binary Sort Tree\uff09\u53c8\u79f0\u4e8c\u53c9\u641c\u7d22\u6811\u3001\u4e8c\u53c9\u67e5\u627e\u6811<\/p>\n<p>\u5b9a\u4e49\uff1a\u4e8c\u53c9\u6392\u5e8f\u6811\u6216\u662f\u7a7a\u6811\uff0c\u6216\u662f\u6ee1\u8db3\u5982\u4e0b\u6027\u8d28\u7684\u4e8c\u53c9\u6811\uff1a<\/p>\n<ol start=\"\">\n<li>\u82e5\u5176<strong>\u5de6\u5b50\u6811<\/strong>\u975e\u7a7a\uff0c\u5219\u5de6\u5b50\u6811\u4e0a\u6240\u6709\u7ed3\u70b9\u7684\u503c\u5747<strong>\u5c0f\u4e8e\u6839\u8282\u70b9<\/strong>\u7684\u503c\uff1b<\/li>\n<li>\u82e5\u5176<strong>\u53f3\u5b50\u6811<\/strong>\u975e\u7a7a\uff0c\u5219\u53f3\u5b50\u6811\u4e0a\u6240\u6709\u7ed3\u70b9\u7684\u503c\u5747<strong>\u5927\u4e8e\u7b49\u4e8e\u6839\u8282\u70b9<\/strong>\u7684\u503c<\/li>\n<li>\u5176<strong>\u5de6\u53f3\u5b50\u6811\u672c\u8eab\u53c8\u5404\u662f\u4e00\u68f5\u4e8c\u53c9\u6392\u5e8f\u6811<\/strong><\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441031.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>\u5bf9\u4e8c\u53c9\u6392\u5e8f\u6811\u4e2d\u5e8f\u904d\u5386\u4f1a\u7684\u5230\u4e00\u4e2a\u9012\u589e\u5e8f\u5217<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441038.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p>\u5b58\u50a8\u7ed3\u6784<\/p>\n<pre><code class=\"language-cpp\" lang=\"cpp\">typedef int keyType;\n\ntypedef struct {\n\tkeyType key;\t\/\/ \u5173\u952e\u5b57\u57df\n\t\/\/ InfoType otherInfo;\t\/\/ \u5176\u4ed6\u6570\u636e\u57df\n} elemType;\n\n\ntypedef struct node {\n\telemType data;\t\/\/ \u6570\u636e\u57df\n\tstruct node* leftChild, * righrChild;\t\/\/ \u5de6\u53f3\u5b69\u5b50\u6307\u9488\n} BSTNode, * BSTree;\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h4>\u67e5\u627e<\/h4>\n<p>\u7b97\u6cd5\u601d\u60f3\uff1a<\/p>\n<ol start=\"\">\n<li>\u82e5\u4e8c\u53c9\u6392\u5e8f\u6811\u4e3a\u7a7a\uff0c\u5219\u67e5\u627e\u5931\u8d25\uff0c\u8fd4\u56de\u7a7a\u6307\u9488<\/li>\n<li>\u82e5\u4e8c\u53c9\u6392\u5e8f\u6811\u975e\u7a7a\uff0c\u5c06\u7ed9\u5b9a\u503ckey\u4e0e\u6839\u7ed3\u70b9\u7684\u5173\u952e\u5b57T-&gt;data.key\u8fdb\u884c\u6bd4\u8f83\uff1a<\/li>\n<li>\n<ol start=\"\">\n<li>\u82e5key\u7b49\u4e8eT-&gt;data.key,\u5219<strong>\u67e5\u627e\u6210\u529f<\/strong>\uff0c\u8fd4\u56de\u6839\u7ed3\u70b9\u5730\u5740<\/li>\n<li>\u82e5key\u5c0f\u4e8eT-&gt;data.key,\u5219\u8fdb\u4e00\u6b65<strong>\u67e5\u627e\u5de6\u5b50\u6811<\/strong><\/li>\n<li>\u82e5key\u5927\u4e8eT-&gt;data.key,\u5219\u8fdb\u4e00\u6b65<strong>\u67e5\u627e\u53f3\u5b50\u6811<\/strong><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<pre><code class=\"language-cpp\" lang=\"cpp\">\/*******************************************************************************************************************************\n * @description\uff1a\u4e8c\u53c9\u6392\u5e8f\u6811\u7684\u67e5\u627e\u7b97\u6cd5\n * @param\uff1aT\n * @param\uff1akey\n * @return\uff1a\n *\/\nBSTree BSTSearch(BSTree T, keyType key) {\n\tif (T == NULL) {\n\t\treturn NULL;\n\t}\n\telse if (key == T-&gt;data.key) {\n\t\treturn T;\n\t}\n\telse if (key &lt; T-&gt;data.key) {\n\t\treturn BSTSearch(T-&gt;leftChild, key);\n\t}\n\telse {\n\t\treturn BSTSearch(T-&gt;righrChild, key);\n\t}\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u67e5\u627e\u5206\u6790<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441045.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>\u95ee\u9898\uff1a\u5982\u4f55\u63d0\u9ad8\u5f62\u6001\u4e0d\u5747\u8861\u7684\u4e8c\u53c9\u6392\u5e8f\u6811\u7684\u67e5\u627e\u6548\u7387<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a\u505a\u201c\u5e73\u8861\u5316\u201d\u5904\u7406\uff0c\u5373\u5c3d\u91cf\u8ba9\u4e8c\u53c9\u6811\u7684\u5f62\u72b6\u5747\u8861<\/p>\n<p>&nbsp;<\/p>\n<h4>\u63d2\u5165<\/h4>\n<ul>\n<li>\u82e5\u4e8c\u53c9\u6392\u5e8f\u6811\u4e3a\u7a7a\uff0c\u5219\u63d2\u5165\u7ed3\u70b9\u4f5c\u4e3a\u6839\u7ed3\u70b9\u63d2\u5165\u5230\u7a7a\u6811\u4e2d<\/li>\n<li>\u5426\u5219\uff0c\u7ee7\u7eed\u5728\u5176\u5de6\u3001\u53f3\u5b50\u6811\u4e0a\u67e5\u627e<\/li>\n<li>\n<ul>\n<li>\u6811\u4e2d\u5df2\u6709\uff0c\u4e0d\u518d\u63d2\u5165<\/li>\n<li>\u6811\u4e2d\u6ca1\u6709<\/li>\n<\/ul>\n<\/li>\n<li>\n<ul>\n<li>\n<ul>\n<li>\u67e5\u627e\u76f4\u81f3\u67d0\u4e2a\u53f6\u5b50\u7ed3\u70b9\u7684\u5de6\u5b50\u6811\u6216\u53f3\u5b50\u6811\u4e3a\u7a7a\u4e3a\u6b62\uff0c\u5219\u63d2\u5165<\/li>\n<li>\u7ed3\u70b9\u5e94\u4e3a\u8be5\u53f6\u5b50\u7ed3\u70b9\u7684\u5de6\u5b69\u5b50\u6216\u53f3\u5b69\u5b50<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre><code class=\"language-cpp\" lang=\"cpp\">\/*******************************************************************************************************************************\n * @description\uff1a\u4e8c\u53c9\u6392\u5e8f\u6811\u7684\u63d2\u5165\u7b97\u6cd5\n * @param\uff1aT\n * @param\uff1ae\n * @return\uff1a\n *\/\nBSTree BSTInsert(BSTree&amp; T, elemType e) {\n\tif (T == NULL) {\n\t\tT = (BSTree)malloc(sizeof(BSTNode));\n\t\tT-&gt;data = e;\n\t\tT-&gt;leftChild = T-&gt;righrChild = NULL;\n\t}\n\telse if (e.key &lt; T-&gt;data.key) {\n\t\tT-&gt;leftChild = BSTInsert(T-&gt;leftChild, e);\n\t}\n\telse if (e.key &gt; T-&gt;data.key) {\n\t\tT-&gt;righrChild = BSTInsert(T-&gt;righrChild, e);\n\t}\n\treturn T;\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h4>\u751f\u6210<\/h4>\n<p>\u4e00\u4e2a\u65e0\u5e8f\u5e8f\u5217\u53ef\u901a\u8fc7\u6784\u9020\u4e8c\u53c9\u6392\u5e8f\u6811\u800c\u53d8\u4e3a\u4e00\u4e2a\u6709\u5e8f\u5e8f\u5217\u3002\u6784\u9020\u6811\u7684\u8fc7\u7a0b\u5c31\u662f\u5bf9\u65e0\u5e8f\u5e8f\u5217\u8fdb\u884c\u6392\u5e8f\u7684\u8fc7\u7a0b<\/p>\n<p>\u63d2\u5165\u7684\u7ed3\u70b9\u5747\u4e3a\u53f6\u5b50\u7ed3\u70b9\uff0c\u6545\u65e0\u9700\u79fb\u52a8\u5176\u5b83\u7ed3\u70b9\u3002\u76f8\u5f53\u4e8e\u5728\u6709\u5e8f\u5e8f\u5217\u4e0a\u63d2\u5165\u8bb0\u5f55\u800c\u65e0\u9700\u79fb\u52a8\u5176\u5b83\u8bb0\u5f55<\/p>\n<p>&nbsp;<\/p>\n<p>\u4e0d\u540c\u63d2\u5165\u6b21\u5e8f\u7684\u5e8f\u5217\u751f\u6210\u4e0d\u540c\u5f62\u6001\u7684\u4e8c\u53c9\u6392\u5e8f\u6811<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441043.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<pre><code class=\"language-cpp\" lang=\"cpp\">\/*******************************************************************************************************************************\n * @description\uff1a\u4e8c\u53c9\u6392\u5e8f\u6811\u7684\u751f\u6210\u7b97\u6cd5\n * @param\uff1aT\n * @param\uff1aa\n * @param\uff1an\n *\/\nvoid CreateBST(BSTree&amp; T, keyType a[], int n) {\n\tT = NULL;\n\tfor (int i = 0; i &lt; n; i++) {\n\t\telemType e;\n\t\te.key = a[i];\n\t\tBSTInsert(T, e);\n\t}\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h4>\u5220\u9664<\/h4>\n<p>\u4ece\u4e8c\u53c9\u6392\u5e8f\u6811\u4e2d\u5220\u9664\u4e00\u4e2a\u7ed3\u70b9\uff0c\u4e0d\u80fd\u628a\u4ee5\u8be5\u8282\u70b9\u4e3a\u6839\u7684\u5b50\u6811\u90fd\u5220\u53bb\uff0c\u53ea\u80fd\u5220\u6389\u8be5\u7ed3\u70b9\uff0c\u5e76\u4e14<strong>\u8fd8\u5e94\u4fdd\u8bc1\u5220\u9664\u540e\u6240\u5f97\u7684\u4e8c\u53c9\u6811\u4ecd\u7136\u6ee1\u8db3\u4e8c\u53c9\u6392\u5e8f\u6811\u7684\u6027\u8d28\u4e0d\u53d8<\/strong><\/p>\n<p>\u7531\u4e8e\u4e2d\u5e8f\u904d\u5386\u4e8c\u53c9\u6392\u5e8f\u6811\u53ef\u4ee5\u5f97\u5230\u4e00\u4e2a\u9012\u589e\u6709\u5e8f\u7684\u5e8f\u5217\u3002\u90a3\u4e48\uff0c\u5728\u4e8c\u53c9\u6392\u5e8f\u6811\u4e2d\u5220\u9664\u4e00\u4e2a\u7ed3\u70b9\u76f8\u5f53\u4e8e\u5220\u53bb\u6709\u5e8f\u5e8f\u5217\u4e2d\u7684\u4e00\u4e2a\u7ed3\u70b9<\/p>\n<ul>\n<li>\u5c06\u56e0\u5220\u9664\u7ed3\u70b9\u800c\u65ad\u5f00\u7684\u4e8c\u53c9\u94fe\u8868\u91cd\u65b0\u8fde\u63a5\u8d77\u6765<\/li>\n<li>\u9632\u6b62\u91cd\u65b0\u94fe\u63a5\u540e\u6811\u7684\u9ad8\u5ea6\u589e\u52a0<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol start=\"\">\n<li>\u88ab\u5220\u9664\u7684\u7ed3\u70b9\u662f\u53f6\u5b50\u7ed3\u70b9\uff1a\u76f4\u63a5\u5220\u53bb\u8be5\u7ed3\u70b9<\/li>\n<li>\u88ab\u5220\u9664\u7684\u7ed3\u70b9\u53ea\u6709\u5de6\u5b50\u6811\u6216\u8005\u53ea\u6709\u53f3\u5b50\u6811\uff0c\u7528\u5176\u5de6\u5b50\u6811\u6216\u8005\u53f3\u5b50\u6811\u66ff\u6362\u5b83\uff08\u7ed3\u70b9\u66ff\u6362\uff09<\/li>\n<li>\u88ab\u5220\u7ed3\u70b9\u65e2\u6709\u5de6\u5b50\u6811\uff0c\u4e5f\u6709\u53f3\u5b50\u6811\uff1a\n<ol>\n<li>\u4ee5\u5176\u4e2d\u5e8f\u524d\u8d8b\u503c\u66ff\u6362\u4e4b\uff08\u503c\u66ff\u6362\uff09\uff0c\u7136\u540e\u518d\u5220\u9664\u8be5\u524d\u8d8b\u7ed3\u70b9\u3002<strong>\u524d\u8d8b\u662f\u5de6\u5b50\u6811\u4e2d\u6700\u5927\u7684\u7ed3\u70b9<\/strong><\/li>\n<li>\u4e5f\u53ef\u4ee5\u7528\u5176\u540e\u7ee7\u66ff\u6362\u4e4b\uff0c\u7136\u540e\u518d\u5220\u9664\u540e\u7ee7\u7ed3\u70b9\u3002<strong>\u540e\u7ee7\u662f\u53f3\u5b50\u6811\u4e2d\u6700\u5c0f\u7684\u7ed3\u70b9<\/strong><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441052.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<pre><code class=\"language-cpp\" lang=\"cpp\">\/*******************************************************************************************************************************\n * @description\uff1a\u4e8c\u53c9\u6392\u5e8f\u6811\u7684\u5220\u9664\u7b97\u6cd5\n * @param\uff1aT\n * @param\uff1akey\n * @return\uff1a\n *\/\nBSTree BSTDelete(BSTree&amp; T, keyType key) {\n\tif (T == NULL) {\n\t\treturn NULL;\n\t}\n\telse if (key &lt; T-&gt;data.key) {\n\t\tT-&gt;leftChild = BSTDelete(T-&gt;leftChild, key);\n\t}\n\telse if (key &gt; T-&gt;data.key) {\n\t\tT-&gt;righrChild = BSTDelete(T-&gt;righrChild, key);\n\t}\n\telse {\n\t\tif (T-&gt;leftChild == NULL) {\n\t\t\tBSTree p = T;\n\t\t\tT = T-&gt;righrChild;\n\t\t\tfree(p);\n\t\t}\n\t\telse if (T-&gt;righrChild == NULL) {\n\t\t\tBSTree p = T;\n\t\t\tT = T-&gt;leftChild;\n\t\t\tfree(p);\n\t\t}\n\t\telse {\n\t\t\tBSTree p = T-&gt;righrChild;\n\t\t\twhile (p-&gt;leftChild != NULL) {\n\t\t\t\tp = p-&gt;leftChild;\n\t\t\t}\n\t\t\tT-&gt;data = p-&gt;data;\n\t\t\tT-&gt;righrChild = BSTDelete(T-&gt;righrChild, p-&gt;data.key);\n\t\t}\n\t}\n\treturn T;\n}\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h3>7.3.2 \u5e73\u8861\u4e8c\u53c9\u6811<\/h3>\n<p>\u5e73\u8861\u4e8c\u53c9\u6811\uff08balanced binary tree\uff09<\/p>\n<ul>\n<li>\u53c8\u79f0AVL\u6811\uff08Adelson-Velskii and Landis\uff09<\/li>\n<li>\u4e00\u68f5\u5e73\u8861\u4e8c\u53c9\u6811\u6216\u8005\u662f\u7a7a\u6811\uff0c\u6216\u8005\u662f\u5177\u6709\u4ee5\u4e0b\u6027\u8d28\u7684<strong>\u4e8c\u53c9\u6392\u5e8f\u6811<\/strong>\uff1a\n<ul>\n<li><strong>\u5de6\u5b50\u6811<\/strong>\u4e8e<strong>\u53f3\u5b50\u6811<\/strong>\u7684<strong>\u9ad8\u5ea6\u4e4b\u5dee<\/strong>\u7684\u7edd\u5bf9\u503c<strong>\u5c0f\u4e8e\u7b49\u4e8e1<\/strong><\/li>\n<li>\u5de6\u5b50\u6811\u548c\u53f3\u5b50\u6811\u4e5f\u662f\u5e73\u8861\u4e8c\u53c9\u6392\u5e8f\u6811<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u4e3a\u4e86\u65b9\u4fbf\u8d77\u89c1\uff0c\u7ed9\u6bcf\u4e2a\u7ed3\u70b9\u9644\u52a0\u4e00\u4e2a\u6570\u5b57\uff0c\u7ed9\u51fa\u8be5\u8282\u70b9\u5de6\u5b50\u6811\u4e0e\u53f3\u5b50\u6811\u7684\u9ad8\u5ea6\u5dee\u3002\u8fd9\u4e2a\u6570\u5b57\u79f0\u4e3a\u8be5\u8282\u70b9\u7684<strong>\u5e73\u8861\u56e0\u5b50\uff08BF\uff09<\/strong><\/p>\n<p><strong>\u5e73\u8861\u56e0\u5b50 = \u7ed3\u70b9\u5de6\u5b50\u6811\u7684\u9ad8\u5ea6 &#8211; \u7ed3\u70b9\u53f3\u5b50\u6811\u7684\u9ad8\u5ea6<\/strong><\/p>\n<p>\u6839\u636e\u5e73\u8861\u4e8c\u53c9\u6811\u7684\u5b9a\u4e49\uff0c\u5e73\u8861\u4e8c\u53c9\u6811\u4e0a\u6240\u6709\u7ed3\u70b9\u7684\u5e73\u8861\u56e0\u5b50\u53ea\u80fd\u662f -1\u30010\u62161<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441545.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>\u5bf9\u4e8e\u4e00\u68f5\u6709n\u4e2a\u7ed3\u70b9\u7684AVL\u6811\uff0c\u5176\u9ad8\u5ea6\u4fdd\u6301\u5728O(log(2, n))\u6570\u91cf\u7ea7\uff0cASL\u4e5f\u4fdd\u6301\u5728O(log(2, n))\u91cf\u7ea7<\/p>\n<p>&nbsp;<\/p>\n<p>\u5f53\u6211\u4eec\u5728\u4e00\u4e2a\u5e73\u8861\u4e8c\u53c9\u6392\u5e8f\u6811\u4e0a\u63d2\u5165\u4e00\u4e2a\u7ed3\u70b9\u65f6\uff0c\u6709\u53ef\u80fd\u5bfc\u81f4\u5931\u8861\uff0c\u5373\u51fa\u73b0\u5e73\u8861\u56e0\u5b50\u7edd\u5bf9\u503c\u5927\u4e8e1\u7684\u7ed3\u70b9\uff0c\u5982\uff1a2\u3001-2<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441551.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>\u5982\u679c\u5728\u4e00\u68f5AVL\u6811\u4e2d\u63d2\u5165\u4e00\u4e2a\u65b0\u7ed3\u70b9\u540e\u9020\u6210\u5931\u8861\uff0c\u5219\u5fc5\u987b<strong>\u91cd\u65b0\u8c03\u6574\u6811\u7684\u7ed3\u6784<\/strong>\uff0c\u4f7f\u4e4b\u6062\u590d\u5e73\u8861<\/p>\n<p>&nbsp;<\/p>\n<p>\u5e73\u8861\u8c03\u6574\u7684\u56db\u79cd\u7c7b\u578b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441556.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p>\u8c03\u6574\u539f\u5219\uff1a<\/p>\n<ol start=\"\">\n<li>\u964d\u4f4e\u9ad8\u5ea6<\/li>\n<li>\u4fdd\u6301\u4e8c\u53c9\u6392\u5e8f\u6811\u6027\u8d28<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441564.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h4>LL\u578b\u8c03\u6574<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441270.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<ul>\n<li>B\u7ed3\u70b9\u5e26\u5de6\u5b50\u6811\u4e00\u8d77\u4e0a\u5347<\/li>\n<li>A\u7ed3\u70b9\u79f0\u4e3aB\u7684\u53f3\u5b69\u5b50<\/li>\n<li>\u539f\u6765B\u7ed3\u70b9\u7684\u53f3\u5b50\u6811\u4f5c\u4e3aA\u7684\u5de6\u5b50\u6811<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441273.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h4>RR\u578b\u8c03\u6574<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441278.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<ul>\n<li>B\u7ed3\u70b9\u5e26\u53f3\u5b50\u6811\u4e00\u8d77\u4e0a\u5347<\/li>\n<li>A\u7ed3\u70b9\u6210\u4e3aB\u7684\u5de6\u5b69\u5b50<\/li>\n<li>\u539f\u6765B\u7ed3\u70b9\u7684\u5de6\u5b69\u5b50\u4f5c\u4e3aA\u7684\u53f3\u5b69\u5b50<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441281.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h4>LR\u578b\u8c03\u6574<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441282.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<ul>\n<li>C\u7ed3\u70b9\u7a7f\u8fc7A\u3001B\u7ed3\u70b9\u4e0a\u5347<\/li>\n<li>B\u7ed3\u70b9\u6210\u4e3aC\u7684\u5de6\u5b69\u5b50\uff0cA\u7ed3\u70b9\u6210\u4e3aC\u7684\u53f3\u5b69\u5b50<\/li>\n<li>\u539f\u6765C\u7ed3\u70b9\u7684\u5de6\u5b69\u5b50\u6811\u4f5c\u4e3aB\u7684\u53f3\u5b50\u6811\uff0c\u539f\u6765C\u7ed3\u70b9\u7684\u53f3\u5b50\u6811\u4f5c\u4e3aA\u7684\u5de6\u5b50\u6811<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441290.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h4>RL\u578b<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441688.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h2>7.4 \u6563\u5217\u8868\u7684\u67e5\u627e<\/h2>\n<p>\u57fa\u672c\u601d\u60f3\uff1a\u8bb0\u5f55\u7684\u5b58\u50a8\u4f4d\u7f6e\u4e0e\u5173\u952e\u5b57\u4e4b\u95f4\u5b58\u5728\u5bf9\u5e94\u5173\u7cfb\t\u5bf9\u5e94\u5173\u7cfb\u2014\u2014hash\u51fd\u6570<\/p>\n<p>Loc(i) = H(keyi)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441690.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h3>7.4.1 \u76f8\u5173\u672f\u8bed<\/h3>\n<p>\u6563\u5217\u65b9\u6cd5\uff08\u6742\u51d1\u6cd5\uff09\uff1a<\/p>\n<p>\u9009\u53d6\u67d0\u4e2a\u51fd\u6570\uff0c\u4f9d\u8be5\u51fd\u6570\u6309\u5173\u952e\u5b57<strong>\u8ba1\u7b97\u5143\u7d20\u7684\u5b58\u50a8\u4f4d\u7f6e<\/strong>\uff0c\u5e76\u6309\u6b64\u5b58\u653e\uff1b\u67e5\u627e\u65f6\uff0c<strong>\u7531\u540c\u4e00\u4e2a\u51fd\u6570\u5bf9\u7ed9\u5b9a\u503ck\u8ba1\u7b97\u5730\u5740<\/strong>\uff0c\u5c06k\u4e0e\u5730\u5740\u5355\u5143\u4e2d\u5143\u7d20\u5173\u952e\u7801\u8fdb\u884c\u5bf9\u6bd4\uff0c\u786e\u5b9a\u67e5\u627e\u662f\u5426\u6210\u529f<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u6563\u5217\u51fd\u6570\uff08\u6742\u51d1\u51fd\u6570<\/strong>\uff09\uff1a\u6563\u5217\u65b9\u6cd5\u4e2d\u4f7f\u7528\u7684<strong>\u8f6c\u6362\u51fd\u6570<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u51b2\u7a81\uff1a\u4e0d\u540c\u7684\u5173\u952e\u7801\u6620\u5c04\u5230\u540c\u4e00\u4e2a\u6563\u5217\u5730\u5740<\/p>\n<p>key1 \u2260 key2\uff0c\u4f46\u662fH(key1) = H(key2)<\/p>\n<p>\u4f8b\uff1a\u67096\u4e2a\u5143\u7d20\u7684\u5173\u952e\u7801\u5206\u522b\u4e3a\uff1a\uff0825\uff0c21\uff0c39\uff0c9\uff0c23\uff0c11\uff09<\/p>\n<ul>\n<li>\u9009\u53d6\u5173\u952e\u7801\u4e0e\u5143\u7d20\u4f4d\u7f6e\u95f4\u7684\u51fd\u6570\u4e3aH(k) = k mod 7<\/li>\n<li>\u5730\u5740\u7f16\u7801\u4ece0-6<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441698.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h3>7.4.2 \u6563\u5217\u51fd\u6570\u7684\u6784\u9020\u65b9\u6cd5<\/h3>\n<p>\u4f7f\u7528\u6563\u5217\u8868\u8981\u89e3\u51b3\u597d\u4e24\u4e2a\u95ee\u9898\uff1a<\/p>\n<ol start=\"\">\n<li>\u6784\u9020\u597d\u7684\u6563\u5217\u51fd\u6570\n<ol>\n<li>\u6240\u9009\u51fd\u6570\u5c3d\u53ef\u80fd\u7b80\u5355\uff0c\u4ee5\u4fbf\u63d0\u9ad8\u8f6c\u6362\u901f\u5ea6<\/li>\n<li>\u6240\u9009\u51fd\u6570\u5bf9\u5173\u952e\u7801\u8ba1\u7b97\u51fa\u7684\u5730\u5740\uff0c\u5e94\u5728\u6563\u5217\u5730\u5740\u96c6\u4e2d\u81f4\u5747\u5300\u5206\u5e03\uff0c\u4ee5\u51cf\u5c11\u7a7a\u95f4\u6d6a\u8d39<\/li>\n<\/ol>\n<\/li>\n<li>\u5236\u5b9a\u4e00\u4e2a\u597d\u7684\u89e3\u51b3\u51b2\u7a81\u7684\u65b9\u6848\n<ol>\n<li>\u67e5\u627e\u65f6\uff0c\u5982\u679c\u4ece\u6563\u5217\u51fd\u6570\u8ba1\u7b97\u51fa\u7684\u5730\u5740\u4e2d\u67e5\u4e0d\u5230\u5173\u952e\u7801\uff0c\u5219\u5e94\u5f53\u4f9d\u636e\u89e3\u51b3\u51b2\u7a81\u7684\u539f\u5219\uff0c\u6709\u89c4\u5f8b\u5730\u67e5\u8be2\u5176\u5b83\u76f8\u5173\u5355\u5143<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>\u6784\u9020\u6563\u5217\u51fd\u6570\u8003\u8651\u7684\u56e0\u7d20\uff1a<\/p>\n<ol start=\"\">\n<li>\u6267\u884c\u901f\u5ea6\uff08\u5373\u8ba1\u7b97\u6563\u5217\u51fd\u6570\u6240\u9700\u7684\u65f6\u95f4\uff09<\/li>\n<li>\u5173\u952e\u5b57\u7684\u957f\u5ea6<\/li>\n<li>\u6563\u5217\u8868\u7684\u5927\u5c0f<\/li>\n<li>\u5173\u952e\u5b57\u7684\u5206\u5e03\u60c5\u51b5<\/li>\n<li>\u67e5\u627e\u9891\u7387<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>\u6839\u636e\u5143\u7d20\u96c6\u5408\u7684\u7279\u6027\u6784\u9020<\/p>\n<ul>\n<li>\u8981\u6c42\u4e00\uff1an\u4e2a\u6570\u636e\u539f\u4ec5\u5360\u7528n\u4e2a\u5730\u5740\uff0c\u867d\u7136\u6563\u5217\u67e5\u627e\u662f\u4ee5\u7a7a\u95f4\u6362\u65f6\u95f4\uff0c\u4f46\u4ecd\u5e0c\u671b\u6563\u5217\u7684<strong>\u5730\u5740\u7a7a\u95f4\u5c3d\u91cf\u5c0f<\/strong><\/li>\n<li>\u8981\u6c42\u4e8c\uff1a\u65e0\u8bba\u7528\u4ec0\u4e48\u65b9\u6cd5\u5b58\u50a8\uff0c\u76ee\u7684\u90fd\u662f\u5c3d\u91cf<strong>\u5747\u5300<\/strong>\u5730\u5b58\u653e\u5143\u7d20\uff0c\u4ee5\u907f\u514d\u51b2\u7a81<\/li>\n<\/ul>\n<p>\u6784\u9020\u65b9\u6cd5\uff1a<\/p>\n<ol start=\"\">\n<li><strong>\u76f4\u63a5\u5b9a\u5740\u6cd5<\/strong><\/li>\n<li>\u6570\u5b57\u5206\u6790\u6cd5<\/li>\n<li>\u5e73\u65b9\u53d6\u4e2d\u6cd5<\/li>\n<li>\u6298\u53e0\u6cd5<\/li>\n<li><strong>\u9664\u7559\u4f59\u6570\u6cd5<\/strong><\/li>\n<li>\u968f\u673a\u6570\u6cd5<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4>\u76f4\u63a5\u5b9a\u5740\u6cd5<\/h4>\n<p>Hash(key) = a\u00b7key +b \uff08a\u3001b\u4e3a\u5e38\u6570\uff09<\/p>\n<p>\u4f18\u70b9\uff1a\u4ee5\u5173\u952e\u5417key\u7684\u67d0\u4e2a\u7ebf\u6027\u51fd\u6570\u4e3a\u6563\u5217\u5730\u5740\uff0c\u4e0d\u4f1a\u4ea7\u751f\u51b2\u7a81<\/p>\n<p>\u7f3a\u70b9\uff1a\u8981\u5360\u7528\u8fde\u7eed\u5730\u5740\u7a7a\u95f4\uff0c\u7a7a\u95f4\u6548\u7387\u4f4e<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441706.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h4>\u9664\u7559\u4f59\u6570\u6cd5<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441709.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h3>7.4.3 \u5904\u7406\u51b2\u7a81\u7684\u65b9\u6cd5<\/h3>\n<ol start=\"\">\n<li>\u5f00\u653e\u5b9a\u5740\u6cd5\uff08\u5f00\u5730\u5740\u6cd5\uff09<\/li>\n<li>\u94fe\u5730\u5740\u6cd5\uff08\u62c9\u94fe\u6cd5\uff09<\/li>\n<li>\u518d\u6563\u5217\u6cd5\uff08\u53cc\u6563\u5217\u51fd\u6570\u6cd5\uff09<\/li>\n<li>\u5efa\u7acb\u4e00\u4e2a\u516c\u5171\u6ea2\u51fa\u533a<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4>\u5f00\u653e\u5b9a\u5740\u6cd5<\/h4>\n<p>\u57fa\u672c\u601d\u60f3\uff1a\u6709\u51b2\u7a81\u65f6\u5c31\u53bb\u5bfb\u627e\u4e0b\u4e00\u4e2a\u7a7a\u7684\u6563\u5217\u5730\u5740\uff0c\u53ea\u8981\u6563\u5217\u8868\u8db3\u591f\u5927\uff0c\u7a7a\u7684\u6563\u5217\u5730\u5740\u603b\u80fd\u627e\u5230\uff0c\u5e76\u5c06\u6570\u636e\u5143\u7d20\u5b58\u5165<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441713.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u7ebf\u6027\u63a2\u6d4b\u6cd5<\/strong><\/p>\n<p>\u4f8b\uff1a\u5173\u952e\u7801\u96c6\u4e3a{47\u30017\u300129\u300111\u300116\u300192\u300122\u30018\u30013}\uff0c\u6563\u5217\u8868\u7684\u957f\u5ea6\u4e3a m=11\uff1b\u6563\u5217\u51fd\u6570\u4e3aHash(key) = key mod 11\uff1b\u62df\u7528\u7ebf\u6027\u63a2\u6d4b\u6cd5\u89e3\u51b3\u51b2\u7a81\u3002\u5efa\u6563\u5217\u8868\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441486.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>\u5e73\u5747\u67e5\u627e\u957f\u5ea6ASL= (1+2+1+1+1+4+1+2+2)\/9=1.67<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u4e8c\u6b21\u63a2\u6d4b\u6cd5<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441485.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<h4>\u94fe\u5730\u5740\u6cd5<\/h4>\n<p>\u53c8\u79f0\u62c9\u94fe\u6cd5\uff0c\u57fa\u672c\u601d\u60f3\uff1a\u76f8\u540c\u6563\u5217\u5730\u5740\u7684\u8bb0\u5f55\u94fe\u6210\u4e00\u5355\u94fe\u8868<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441480.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p>\u94fe\u5730\u5740\u6cd5\u5efa\u7acb\u6563\u5217\u8868\u7684\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>Step1:\u53d6\u6570\u636e\u5143\u7d20\u7684\u5173\u952e\u5b57key,\u8ba1\u7b97\u5176\u6563\u5217\u51fd\u6570\u503c\uff08\u5730\u5740\uff09\u3002\u82e5\u8be5\u5730\u5740\u5bf9\u5e94\u7684\u94fe\u8868\u4e3a\u7a7a\uff0c\u5219\u5c06\u8be5\u5143\u7d20\u63d2\u5165\u6b64\u94fe\u8868\uff1b\u5426\u5219\u6267\u884cStep2\u89e3\u51b3\u51b2\u7a81\u3002<\/li>\n<li>Step2:\u6839\u636e\u9009\u62e9\u7684\u51b2\u7a81\u5904\u7406\u65b9\u6cd5\uff0c\u8ba1\u7b97\u5173\u952e\u5b57key\u7684\u4e0b\u4e00\u4e2a\u5b58\u50a8\u5730\u5740\u3002\u82e5\u8be5\u5730\u5740\u5bf9\u5e94\u7684\u94fe\u8868\u4e3a\u4e0d\u4e3a\u7a7a\uff0c\u5219\u5229\u7528\u94fe\u8868\u7684\u524d\u63d2\u6cd5\u6216\u540e\u63d2\u6cd5\u5c06\u8be5\u5143\u7d20\u63d2\u5165\u6b64\u94fe\u8868\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u94fe\u5730\u5740\u6cd5\u7684\u4f18\u70b9\uff1a<\/p>\n<ul>\n<li>\u975e\u540c\u4e49\u8bcd\u4e0d\u4f1a\u51b2\u7a81\uff0c\u65e0\u201c\u805a\u96c6\u201d\u73b0\u8c61<\/li>\n<li>\u94fe\u8868\u4e0a\u7684\u7ed3\u70b9\u7a7a\u95f4\u52a8\u6001\u7533\u8bf7\uff0c\u66f4\u9002\u5408\u4e8e\u8868\u957f\u4e0d\u786e\u5b9a\u7684\u60c5\u51b5<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>7.4.4 \u6563\u5217\u8868\u7684\u67e5\u627e<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441478.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p>\u4f8b\u9898\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441495.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441499.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p>\u6548\u7387\u5206\u6790<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441386.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>ASL\u4e0e\u88c5\u586b\u56e0\u5b50\u03b1\u6709\u5173\uff01\u65e2\u4e0d\u662f\u4e25\u683c\u7684O(1)\uff0c\u4e5f\u4e0d\u662fO(n)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/picture.chentaiyang.space\/202304251441402.png\" referrerpolicy=\"no-referrer\" alt=\"img\"><\/p>\n<p>&nbsp;<\/p>\n<p>\u7ed3\u8bba\uff1a<\/p>\n<ul>\n<li>\u6563\u5217\u8868\u6280\u672f\u5177\u6709\u5f88\u597d\u7684\u5e73\u5747\u6027\u80fd\uff0c\u4f18\u4e8e\u4e00\u4e9b\u4f20\u7edf\u7684\u6280\u672f<\/li>\n<li>\u94fe\u5730\u5740\u6cd5\u4f18\u4e8e\u5f00\u5730\u5740\u6cd5<\/li>\n<li>\u9664\u7559\u4f59\u6570\u6cd5\u4f5c\u6563\u5217\u51fd\u6570\u4f18\u4e8e\u5176\u5b83\u7c7b\u578b\u51fd\u6570<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>7.5 \u5199\u5728\u6700\u540e<\/h2>\n<p>\u5b8c\u6574\u4ee3\u7801\uff1a<a href=\"https:\/\/github.com\/kisstaiyang\/DataStruct\/tree\/main\/%E7%AC%AC7%E7%AB%A0-%E6%9F%A5%E6%89%BE\">\u6233\u6211\ud83c\udf39<\/a><\/p>\n<p>\u672c\u6587\u5b8c<\/p>\n<p>\u656c\u7231\u4e0e\u660e\u5929\ud83c\udf39<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u7ae0\u91cd\u70b9\uff1a\u5e73\u8861\u4e8c\u53c9\u6811\u3001hash<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[82,17,105,104,106],"class_list":["post-376","post","type-post","status-publish","format-standard","hentry","category-11","tag-ds","tag-hashmap","tag-105","tag-104","tag-106"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7b2c7\u7ae0-\u67e5\u627e - #\u762b\u7537\u65e5\u8bb0<\/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:\/\/blog.taiyang.space\/?p=376\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7b2c7\u7ae0-\u67e5\u627e - #\u762b\u7537\u65e5\u8bb0\" \/>\n<meta property=\"og:description\" content=\"\u672c\u7ae0\u91cd\u70b9\uff1a\u5e73\u8861\u4e8c\u53c9\u6811\u3001hash\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.taiyang.space\/?p=376\" \/>\n<meta property=\"og:site_name\" content=\"#\u762b\u7537\u65e5\u8bb0\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-05T07:21:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/picture.chentaiyang.space\/202304251441155.svg\" \/>\n<meta name=\"author\" content=\"taiyang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"taiyang\" \/>\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\":\"Article\",\"@id\":\"https:\/\/blog.taiyang.space\/?p=376#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.taiyang.space\/?p=376\"},\"author\":{\"name\":\"taiyang\",\"@id\":\"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c\"},\"headline\":\"\u7b2c7\u7ae0-\u67e5\u627e\",\"datePublished\":\"2023-05-05T07:21:16+00:00\",\"dateModified\":\"2023-05-05T07:21:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.taiyang.space\/?p=376\"},\"wordCount\":239,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c\"},\"keywords\":[\"DS\",\"HashMap\",\"\u4e8c\u5206\u67e5\u627e\",\"\u5e73\u8861\u4e8c\u53c9\u6811\",\"\u6563\u5217\u67e5\u627e\"],\"articleSection\":[\"\u6570\u636e\u7ed3\u6784\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.taiyang.space\/?p=376#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.taiyang.space\/?p=376\",\"url\":\"https:\/\/blog.taiyang.space\/?p=376\",\"name\":\"\u7b2c7\u7ae0-\u67e5\u627e - #\u762b\u7537\u65e5\u8bb0\",\"isPartOf\":{\"@id\":\"https:\/\/blog.taiyang.space\/#website\"},\"datePublished\":\"2023-05-05T07:21:16+00:00\",\"dateModified\":\"2023-05-05T07:21:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.taiyang.space\/?p=376#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.taiyang.space\/?p=376\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.taiyang.space\/?p=376#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/blog.taiyang.space\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7b2c7\u7ae0-\u67e5\u627e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.taiyang.space\/#website\",\"url\":\"https:\/\/blog.taiyang.space\/\",\"name\":\"#\u762b\u7537\u65e5\u8bb0\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.taiyang.space\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c\",\"name\":\"taiyang\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/blog.taiyang.space\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/blog.taiyang.space\/wp-content\/uploads\/2022\/10\/touxiang.jpg\",\"contentUrl\":\"https:\/\/blog.taiyang.space\/wp-content\/uploads\/2022\/10\/touxiang.jpg\",\"width\":612,\"height\":640,\"caption\":\"taiyang\"},\"logo\":{\"@id\":\"https:\/\/blog.taiyang.space\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/blog.taiyang.space\"],\"url\":\"https:\/\/blog.taiyang.space\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7b2c7\u7ae0-\u67e5\u627e - #\u762b\u7537\u65e5\u8bb0","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:\/\/blog.taiyang.space\/?p=376","og_locale":"zh_CN","og_type":"article","og_title":"\u7b2c7\u7ae0-\u67e5\u627e - #\u762b\u7537\u65e5\u8bb0","og_description":"\u672c\u7ae0\u91cd\u70b9\uff1a\u5e73\u8861\u4e8c\u53c9\u6811\u3001hash","og_url":"https:\/\/blog.taiyang.space\/?p=376","og_site_name":"#\u762b\u7537\u65e5\u8bb0","article_published_time":"2023-05-05T07:21:16+00:00","og_image":[{"url":"https:\/\/picture.chentaiyang.space\/202304251441155.svg"}],"author":"taiyang","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"taiyang","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.taiyang.space\/?p=376#article","isPartOf":{"@id":"https:\/\/blog.taiyang.space\/?p=376"},"author":{"name":"taiyang","@id":"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c"},"headline":"\u7b2c7\u7ae0-\u67e5\u627e","datePublished":"2023-05-05T07:21:16+00:00","dateModified":"2023-05-05T07:21:16+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.taiyang.space\/?p=376"},"wordCount":239,"commentCount":0,"publisher":{"@id":"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c"},"keywords":["DS","HashMap","\u4e8c\u5206\u67e5\u627e","\u5e73\u8861\u4e8c\u53c9\u6811","\u6563\u5217\u67e5\u627e"],"articleSection":["\u6570\u636e\u7ed3\u6784"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.taiyang.space\/?p=376#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.taiyang.space\/?p=376","url":"https:\/\/blog.taiyang.space\/?p=376","name":"\u7b2c7\u7ae0-\u67e5\u627e - #\u762b\u7537\u65e5\u8bb0","isPartOf":{"@id":"https:\/\/blog.taiyang.space\/#website"},"datePublished":"2023-05-05T07:21:16+00:00","dateModified":"2023-05-05T07:21:16+00:00","breadcrumb":{"@id":"https:\/\/blog.taiyang.space\/?p=376#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.taiyang.space\/?p=376"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.taiyang.space\/?p=376#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/blog.taiyang.space\/"},{"@type":"ListItem","position":2,"name":"\u7b2c7\u7ae0-\u67e5\u627e"}]},{"@type":"WebSite","@id":"https:\/\/blog.taiyang.space\/#website","url":"https:\/\/blog.taiyang.space\/","name":"#\u762b\u7537\u65e5\u8bb0","description":"","publisher":{"@id":"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.taiyang.space\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/blog.taiyang.space\/#\/schema\/person\/5e3b9567310d4c4a328573992325178c","name":"taiyang","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/blog.taiyang.space\/#\/schema\/person\/image\/","url":"https:\/\/blog.taiyang.space\/wp-content\/uploads\/2022\/10\/touxiang.jpg","contentUrl":"https:\/\/blog.taiyang.space\/wp-content\/uploads\/2022\/10\/touxiang.jpg","width":612,"height":640,"caption":"taiyang"},"logo":{"@id":"https:\/\/blog.taiyang.space\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/blog.taiyang.space"],"url":"https:\/\/blog.taiyang.space\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=\/wp\/v2\/posts\/376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=376"}],"version-history":[{"count":1,"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=\/wp\/v2\/posts\/376\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=\/wp\/v2\/posts\/376\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.taiyang.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}