{"id":254,"date":"2025-10-30T01:00:20","date_gmt":"2025-10-29T17:00:20","guid":{"rendered":"http:\/\/4.189.252.43\/?p=254"},"modified":"2026-01-01T11:54:10","modified_gmt":"2026-01-01T03:54:10","slug":"%e7%ac%ac%e4%ba%8c%e7%ab%a0-%e7%ba%bf%e6%80%a7%e8%a1%a8","status":"publish","type":"post","link":"http:\/\/4.189.252.43\/index.php\/2025\/10\/30\/%e7%ac%ac%e4%ba%8c%e7%ab%a0-%e7%ba%bf%e6%80%a7%e8%a1%a8\/","title":{"rendered":"\u7b2c\u4e8c\u7ae0 \u7ebf\u6027\u8868"},"content":{"rendered":"\n<h2>\u4e00\u3001\u7ebf\u6027\u8868\u7684\u6982\u5ff5<\/h2>\n<ul>\n<li><span class=\"MathJax_SVG\" tabindex=\"-1\" style=\"font-size: 100%; display: inline-block;\"><svg xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" width=\"2.028ex\" height=\"1.76ex\" viewBox=\"0 -504.6 873 757.9\" role=\"img\" focusable=\"false\" style=\"vertical-align: -0.588ex;\"><defs><path stroke-width=\"0\" id=\"E7-MJMATHI-61\" d=\"M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z\"><\/path><path stroke-width=\"0\" id=\"E7-MJMATHI-69\" d=\"M184 600Q184 624 203 642T247 661Q265 661 277 649T290 619Q290 596 270 577T226 557Q211 557 198 567T184 600ZM21 287Q21 295 30 318T54 369T98 420T158 442Q197 442 223 419T250 357Q250 340 236 301T196 196T154 83Q149 61 149 51Q149 26 166 26Q175 26 185 29T208 43T235 78T260 137Q263 149 265 151T282 153Q302 153 302 143Q302 135 293 112T268 61T223 11T161 -11Q129 -11 102 10T74 74Q74 91 79 106T122 220Q160 321 166 341T173 380Q173 404 156 404H154Q124 404 99 371T61 287Q60 286 59 284T58 281T56 279T53 278T49 278T41 278H27Q21 284 21 287Z\"><\/path><\/defs><g stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" transform=\"matrix(1 0 0 -1 0 0)\"><use xlink:href=\"#E7-MJMATHI-61\" x=\"0\" y=\"0\"><\/use><use transform=\"scale(0.707)\" xlink:href=\"#E7-MJMATHI-69\" x=\"748\" y=\"-213\"><\/use><\/g><\/svg><\/span><script type=\"math\/tex\">a_i<\/script>\u8868\u9879\uff0c <span class=\"MathJax_SVG\" tabindex=\"-1\" style=\"font-size: 100%; display: inline-block;\"><svg xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" width=\"1.394ex\" height=\"1.41ex\" viewBox=\"0 -504.6 600 607.1\" role=\"img\" focusable=\"false\" style=\"vertical-align: -0.238ex;\"><defs><path stroke-width=\"0\" id=\"E8-MJMATHI-6E\" d=\"M21 287Q22 293 24 303T36 341T56 388T89 425T135 442Q171 442 195 424T225 390T231 369Q231 367 232 367L243 378Q304 442 382 442Q436 442 469 415T503 336T465 179T427 52Q427 26 444 26Q450 26 453 27Q482 32 505 65T540 145Q542 153 560 153Q580 153 580 145Q580 144 576 130Q568 101 554 73T508 17T439 -10Q392 -10 371 17T350 73Q350 92 386 193T423 345Q423 404 379 404H374Q288 404 229 303L222 291L189 157Q156 26 151 16Q138 -11 108 -11Q95 -11 87 -5T76 7T74 17Q74 30 112 180T152 343Q153 348 153 366Q153 405 129 405Q91 405 66 305Q60 285 60 284Q58 278 41 278H27Q21 284 21 287Z\"><\/path><\/defs><g stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" transform=\"matrix(1 0 0 -1 0 0)\"><use xlink:href=\"#E8-MJMATHI-6E\" x=\"0\" y=\"0\"><\/use><\/g><\/svg><\/span><script type=\"math\/tex\">n<\/script>\u8868\u957f\u5ea6<\/li>\n<li>\u7b2c\u4e00\u4e2a\u8868\u9879\u662f\u8868\u5934\uff0c\u6700\u540e\u4e00\u4e2a\u662f\u8868\u5c3e<\/li>\n\n<\/ul>\n<ol>\n<li><p>\u903b\u8f91\u7279\u5f81<\/p>\n<ol>\n<li>\u6709\u4e14\u4ec5\u6709\u4e00\u4e2a\u5f00\u59cb\u8282\u70b9\uff0c\u65e0\u76f4\u63a5\u524d\u8d8b<\/li>\n<li>\u6709\u4e14\u4ec5\u6709\u4e00\u4e2a\u7ec8\u7aef\u8282\u70b9\uff0c\u6ca1\u6709\u540e\u7ee7<\/li>\n<li>\u5185\u90e8\u8282\u70b9\u6709\u4e14\u4ec5\u6709\u4e00\u4e2a\u76f4\u63a5\u524d\u8d8b\u548c\u4e00\u4e2a\u76f4\u63a5\u540e\u7ee7<\/li>\n\n<\/ol>\n<\/li>\n<li><p>\u5b58\u50a8\u65b9\u5f0f<\/p>\n<ol>\n<li>\u987a\u5e8f\u5b58\u50a8\u65b9\u5f0f\u2014\u2014\u987a\u5e8f\u8868<\/li>\n<li>\u94fe\u8868\u5b58\u50a8\u65b9\u5f0f\u2014\u2014\u94fe\u8868<\/li>\n\n<\/ol>\n<\/li>\n\n<\/ol>\n<h2>\u4e8c\u3001\u987a\u5e8f\u8868<\/h2>\n<ul>\n<li>\u628a\u7ebf\u6027\u8868\u7684\u8282\u70b9\u6309\u903b\u8f91\u987a\u5e8f\u4f9d\u6b21\u5b58\u653e\u5728\u4e00\u7ec4\u5730\u5740\u8fde\u7eed\u7684\u5b58\u50a8\u5355\u5143\u91cc<\/li>\n\n<\/ul>\n<h3>\u7279\u70b9<\/h3>\n<ul>\n<li>\u5404\u8868\u9879\u7684\u903b\u8f91\u987a\u5e8f\u4e0e\u7269\u7406\u987a\u5e8f\u4e00\u81f4<\/li>\n<li>\u5bf9\u5404\u4e2a\u8868\u9879\u53ef\u4ee5\u9b42\u987a\u5e8f\u95ee\uff0c\u4e5f\u53ef\u4ee5\u968f\u673a\u8bbf\u95ee<\/li>\n\n<\/ul>\n<h3>\u9759\u6001\u5b58\u50a8\u4e0e\u52a8\u6001\u5b58\u50a8<\/h3>\n<pre><code class='language-cpp' lang='cpp'>#define maxSize 100\ntypedef int T;\ntypedef struct{\n    T data[maxSize];\n    int n;\n} SeqList;\n<\/code><\/pre>\n<pre><code class='language-cpp' lang='cpp'>typedef int T;\ntypedef struct{\n    T *data;\n    int maxSize, n;\n} SeqList;\n<\/code><\/pre>\n<h2>\u4e09\u3001\u5355\u94fe\u8868<\/h2>\n<h3>\u7279\u70b9<\/h3>\n<ul>\n<li>\u6bcf\u4e2a\u5143\u7d20\uff08\u8868\u9879\uff09\u7531\u7ed3\u70b9\u6784\u6210<\/li>\n<li>\u7ebf\u6027\u7ed3\u6784<\/li>\n<li>\u7ed3\u70b9\u53ef\u4ee5\u4e0d\u8fde\u7eed\u5b58\u50a8<\/li>\n\n<\/ul>\n<h3>\u524d\u63d2\u6cd5\u5efa\u7acb\u5355\u94fe\u8868<\/h3>\n<p>\u5728\u524d\u9762\u63d2\u5165\u8282\u70b9<\/p>\n<h3>\u540e\u63d2\u6cd5\u5efa\u7acb\u5355\u94fe\u8868<\/h3>\n<p>\u5c3e\u90e8\u53ef\u4ee5\u6709\u4e00\u4e2a<code>last<\/code>\u6307\u9488\uff0c\u6307\u5411\u5c3e\u90e8\uff0c\u65b9\u4fbf\u540e\u63d2<\/p>\n<h3>\u94fe\u8868\u7f6e\u7a7a\u7b97\u6cd5<\/h3>\n<pre><code class='language-cpp' lang='cpp'>template &lt;class T&gt;\nvoid List&lt;T&gt;::makeEmpty(){\n    LinkNode&lt;T&gt; *q;\n    while (first-&gt;link != NULL) {\n    \tq = first-&gt;link;              \n        first-&gt;link = q-&gt;link;    \/\/\u4ece\u94fe\u4e0a\u6458\u4e0b\u8be5\u7ed3\u70b9\n        delete q;\n\t}\n }\uff1b\n<\/code><\/pre>\n<h2>\u56db\u3001\u5355\u94fe\u8868\u7684\u53d8\u5f62\uff1a\u5faa\u73af\u94fe\u8868\u548c\u53cc\u5411\u94fe\u8868<\/h2>\n<h3>\u5faa\u73af\u94fe\u8868<\/h3>\n<p>\u5c3e\u6307\u9488<code>last<\/code>\u6307\u5411\u4e86\u5047\u5934\u6307\u9488<code>fakeHead<\/code><\/p>\n<p><strong>\u7279\u70b9\uff1a<\/strong><\/p>\n<ul>\n<li><p>\u626b\u63cf\u5230\u5c3e\u90e8\u9047\u5230\u7684\u4e0d\u662f<code>NULL<\/code>\uff0c\u800c\u662f<code>fakeHead<\/code>\u3002<\/p>\n<pre><code class='language-cpp' lang='cpp'>template &lt;class T&gt; \nCircListNode&lt;T&gt; * CircList&lt;T&gt;::Search( T x ) \n{\n     \/\/\u5728\u94fe\u8868\u4e2d\u4ece\u5934\u641c\u7d22\u5176\u6570\u636e\u503c\u4e3ax \u7684\u7ed3\u70b9\n\tcurrent = first-&gt;link;\n    while ( current != first &amp;&amp; current-&gt;data != x ) \n    \tcurrent = current-&gt;link;\n    return current;\n}\n<\/code><\/pre>\n<\/li>\n\n<\/ul>\n<h3>\u53cc\u5411\u5faa\u73af\u94fe\u8868<\/h3>\n<p><strong>\u7279\u70b9\uff1a<\/strong><\/p>\n<ul>\n<li><p>\u641c\u7d22\u7684\u65f6\u5019\u53ef\u4ee5\u8bbe\u7f6e\u641c\u7d22\u65b9\u5411<code>d<\/code><\/p>\n<pre><code class='language-cpp' lang='cpp'>template &lt;class T&gt;\nDblNode&lt;T&gt; *DblList&lt;T&gt;::Search (T x, int d) {\n    \/\/\u5728\u53cc\u5411\u5faa\u73af\u94fe\u8868\u4e2d\u5bfb\u627e\u5176\u503c\u7b49\u4e8ex\u7684\u7ed3\u70b9\u3002\n\tDblNode&lt;T&gt; *current = (d == 0)? first-&gt;lLink : first-&gt;rLink;\n    \/\/\u6309d\u786e\u5b9a\u641c\u7d22\u65b9\u5411\n    while ( current != first &amp;&amp; current-&gt;data != x )\n    \tcurrent = (d == 0) ? current-&gt;lLink : current-&gt;rLink;\n    if ( current != first ) return current; \/\/\u641c\u7d22\u6210\u529f\n    else return NULL;\n     \/\/\u641c\u7d22\u5931\u8d25\n};\n<\/code><\/pre>\n<\/li>\n\n<\/ul>\n<h3>\u9759\u6001\u94fe\u8868<\/h3>\n<p>\u4e3a\u6570\u7ec4\u4e2d\u6bcf\u4e00\u4e2a\u5143\u7d20\u9644\u52a0\u4e00\u4e2a\u94fe\u63a5\u6307\u9488\uff0c\u5f62\u6210\u9759\u6001\u94fe\u8868\u7ed3\u6784\u3002<\/p>\n<p>\u4e00\u4e2a\u4e8c\u7ef4\u6570\u7ec4\uff0c\u7b2c\u4e00\u884c\u5b58\u6570\u503c\uff0c\u7b2c\u4e8c\u884c\u5b58\u6307\u9488\uff08\u4e0b\u4e00\u4e2a\u8282\u70b9\u7684\u4f4d\u7f6e\uff09<\/p>\n<p><strong>\u9700\u8981\u5047\u5934<\/strong><\/p>\n<h4>\u7279\u70b9<\/h4>\n<ul>\n<li>\u5904\u7406\u4e2d\u4e0d\u9700\u8981\u6539\u53d8\u7269\u7406\u4f4d\u7f6e<\/li>\n<li>\u6570\u7ec4\u5b9a\u4e49\u7684\uff0c\u5b58\u50a8\u4e2d\u5927\u5c0f\u4e0d\u4f1a\u53d8<\/li>\n\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4e94\u3001\u5355\u94fe\u8868\u7684\u5e94\u7528\u2014\u2014\u591a\u9879\u5f0f<\/h2>\n<h3>1. \u4e0d\u540c\u7269\u7406\u7ed3\u6784\u7684\u4f18\u7f3a\u70b9<\/h3>\n<ul>\n<li><p>\u591a\u9879\u5f0f\u987a\u5e8f\u5b58\u50a8\u8868\u793a\u7684\u7f3a\u70b9<\/p>\n<ul>\n<li>\u63d2\u5165\u548c\u5220\u9664\u65f6\u9879\u6570\u53ef\u80fd\u6709\u8f83\u5927\u53d8\u5316\uff0c\u56e0\u6b64\u8981\u79fb\u52a8\u5927\u91cf\u6570\u636e<\/li>\n<li>\u4e0d\u5229\u4e8e\u591a\u4e2a\u591a\u9879\u5f0f\u7684\u540c\u65f6\u5904\u7406\u3001\u6709\u6ea2\u51fa\u95ee\u9898<\/li>\n\n<\/ul>\n<\/li>\n<li><p>\u591a\u9879\u5f0f\u94fe\u8868\u5b58\u50a8\u8868\u793a\u7684\u4f18\u70b9<\/p>\n<ul>\n<li>\u63d2\u5165\u3001\u5220\u9664\u65b9\u4fbf\uff0c\u4e0d\u79fb\u52a8\u5143\u7d20<\/li>\n<li>\u591a\u9879\u5f0f\u7684\u9879\u6570\u53ef\u4ee5\u52a8\u6001\u5730\u589e\u957f\uff0c\u4e0d\u5b58\u5728\u5b58\u50a8\u6ea2\u51fa\u95ee\u9898\u3002<\/li>\n\n<\/ul>\n<\/li>\n\n<\/ul>\n<p>&nbsp;<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u7ebf\u6027\u8868\u7684\u6982\u5ff5 \u8868\u9879\uff0c \u8868\u957f\u5ea6 \u7b2c\u4e00\u4e2a\u8868\u9879\u662f\u8868\u5934\uff0c\u6700\u540e\u4e00\u4e2a\u662f\u8868\u5c3e \u903b\u8f91\u7279\u5f81 \u6709\u4e14\u4ec5\u6709\u4e00\u4e2a\u5f00\u59cb\u8282\u70b9\uff0c\u65e0\u76f4\u63a5\u524d\u8d8b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[24,5],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-24","category-5"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":2,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":347,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts\/254\/revisions\/347"}],"wp:attachment":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}