{"id":2568,"date":"2020-04-06T19:25:07","date_gmt":"2020-04-06T11:25:07","guid":{"rendered":"http:\/\/www.yuguoxy.com\/geekhome\/?p=2568"},"modified":"2026-08-18T12:35:26","modified_gmt":"2026-08-18T04:35:26","slug":"%e4%bd%a0%e5%bf%85%e9%a1%bb%e8%a6%81%e7%9f%a5%e9%81%93%e7%9a%84javascript%e6%95%b0%e6%8d%ae%e7%bb%93%e6%9e%84%e4%b8%8e%e9%9d%a2%e8%af%95%e9%a2%98%e8%a7%a3%e7%ad%94","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=2568","title":{"rendered":"\u4f60\u5fc5\u987b\u8981\u77e5\u9053\u7684JavaScript\u6570\u636e\u7ed3\u6784\u4e0e\u9762\u8bd5\u9898\u89e3\u7b54"},"content":{"rendered":"<section id=\"wenyan\" style=\"font-family: system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', Roboto, sans-serif; line-height: 1.75; font-size: 16px; color: #000000; caret-color: #000000;\" data-provider=\"WenYan\">\n<p style=\"margin: 1em 0px;\">\u7f16\u7801\u6548\u7387\u4e0d\u53ea\u770b\u5199\u4e86\u51e0\u5c0f\u65f6\uff0c\u8fd8\u770b\u8fd0\u884c\u65f6\u95f4\u548c\u5185\u5b58\u3002JavaScript \u91cc\u6709\u4e00\u6279\u73b0\u6210\u7684 <strong style=\"color: #4870ac;\">\u6570\u636e\u7ed3\u6784<\/strong>\uff0c\u7528\u6765\u7ec4\u7ec7\u6570\u636e\u3001\u5bfc\u822a\u548c\u8bbf\u95ee\u3002\u539f\u6587\uff1a<a class=\"url\" href=\"https:\/\/dev.to\/educative\/7-javascript-data-structures-you-must-know-4k0m\" target=\"_blank\" rel=\"noopener\">https:\/\/dev.to\/educative\/7-javascript-data-structures-you-must-know-4k0m<\/a>\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4f5c\u8005 Ryan Thelin\u3001Amanda Fawcett\uff1b\u8bd1\u6587 web\u524d\u7aef\u5f00\u53d1\uff08web_qdkf\uff09\u3002\u4e0b\u9762\u8986\u76d6\u6570\u7ec4\u3001\u961f\u5217\u3001\u94fe\u8868\u3001\u6811\u3001\u56fe\u3001\u54c8\u5e0c\u8868\uff0c\u5e76\u914d 7 \u9053\u9762\u8bd5\u9898\u3002\u793a\u610f\u56fe\u5168\u90e8\u4fdd\u7559\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u539f\u8bed\u7c7b\u578b\u662f\u8bed\u8a00\u81ea\u5e26\u7684\uff1b\u961f\u5217\u3001\u94fe\u8868\u8fd9\u7c7b <strong style=\"color: #4870ac;\">\u975e\u539f\u8bed\u7ed3\u6784<\/strong> \u7531\u7a0b\u5e8f\u5458\u5b9a\u4e49\u3002\u9762\u8bd5\u91cc\u6570\u636e\u7ed3\u6784\u51e0\u4e4e\u662f\u5fc5\u8003\u9879\u3002<\/p>\n<table style=\"display: table; text-align: left; overflow: auto; border-collapse: collapse; margin: 1.4em auto; max-width: 100%; table-layout: fixed; overflow-wrap: break-word; word-break: break-all;\" width=\"800\">\n<thead>\n<tr>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u7ed3\u6784<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u7279\u5f81<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u4ee3\u4ef7<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Array<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u4e0b\u6807\u968f\u673a\u8bbf\u95ee<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u56fa\u5b9a\u957f\u5ea6\uff0c\u63d2\u5165\u5220\u9664\u8d35<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Queue<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">FIFO \u7f13\u51b2<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u53ea\u80fd\u53d6\u6700\u65e9\u7684\u5143\u7d20<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Linked List<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u6307\u9488\u4e32\u8054\uff0c\u63d2\u5165\u5feb<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u4e0d\u80fd\u6309\u4e0b\u6807\u8df3\uff0c\u5185\u5b58\u66f4\u591a<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Tree \/ BST<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5c42\u6b21\u3001\u6709\u5e8f\u67e5\u627e<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5931\u8861\u4f1a\u9000\u5316\u6210\u7ebf\u6027<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Graph<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u9876\u70b9 + \u8fb9\u8868\u8fbe\u5173\u7cfb<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u76f4\u89c2\u6027\u5dee\uff0c\u8fb9\u591a\u65f6\u96be\u8bfb<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">Hash Table<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u952e\u5230\u6876\uff0c\u67e5\u627e\u63a5\u8fd1 O(1)<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u51b2\u7a81\u8981\u5904\u7406<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin: 1em 0px;\">\u82f1\u6587\u539f\u6587 | <a class=\"url\" href=\"https:\/\/dev.to\/educative\/7-javascript-data-structures-you-must-know-4k0m\" target=\"_blank\" rel=\"noopener\">https:\/\/dev.to\/educative\/7-javascript-data-structures-you-must-know-4k0m<\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u539f\u6587\u4f5c\u8005 | Ryan Thelin\u548cAmanda Fawcett<\/p>\n<p style=\"margin: 1em 0px;\">\u8bd1\u6587\u7ffb\u8bd1 | web\u524d\u7aef\u5f00\u53d1\uff08web_qdkf\uff09<\/p>\n<p style=\"margin: 1em 0px;\">\u89e3\u51b3\u7f16\u7801\u95ee\u9898\u65f6\uff0c\u6548\u7387\u81f3\u9ad8\u65e0\u4e0a\u2013\u4ece\u7f16\u7801\u5c0f\u65f6\u6570\u5230\u8fd0\u884c\u65f6\u95f4\uff0c\u518d\u5230\u7ed9\u89e3\u51b3\u65b9\u6848\u7684\u5185\u5b58\u91cf\u3002\u5e78\u8fd0\u7684\u662f\uff0cJavaScript\u5f00\u53d1\u4eba\u5458\u4f7f\u7528\u4e86\u8bb8\u591a\u9884\u5148\u5efa\u7acb\u7684\u6570\u636e\u7ed3\u6784\uff0c\u65e8\u5728\u89e3\u51b3\u5171\u540c\u7684\u9700\u6c42\u548c\u89e3\u51b3\u5b9e\u9645\u95ee\u9898\u3002\u7cbe\u901a\u6570\u636e\u7ed3\u6784\u662f\u5206\u8fa9\u65b0\u4eba\u4e0e\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\u4e4b\u95f4\u7684\u4e00\u4e2a\u4e3b\u8981\u56e0\u7d20\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e5f\u8bb8\u4f60\u53ea\u662f\u4ece\u6570\u636e\u7ed3\u6784\u5165\u624b\uff0c\u6216\u8005\u4f60\u5df2\u7ecf\u7f16\u7801\u591a\u5e74\uff0c\u53ea\u9700\u8981\u590d\u4e60\u4e00\u4e0b\u3002\u4eca\u5929\uff0c\u6211\u4eec\u5c06\u5e26\u4f60\u4e86\u89e3JS\u5f00\u53d1\u4eba\u5458\u90fd\u9700\u8981\u77e5\u9053\u76847\u4e2aJavaScript\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4ee5\u4e0b\u5c31\u662f\u6211\u4eec\u4eca\u5929\u8981\u8bb2\u7684\u5185\u5bb9\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><strong style=\"color: #4870ac;\">\u4ec0\u4e48\u662f\u6570\u636e\u7ed3\u6784<\/strong><\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">JS\u6570\u636e\u7ed3\u6784<\/strong><\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">\u6570\u636e\u7ed3\u6784\u9762\u8bd5\u9898<\/strong><\/section>\n<\/li>\n<li>\n<section><strong style=\"color: #4870ac;\">\u8d44\u6e90\u5206\u4eab<\/strong><\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u90a3\u8ba9\u6211\u4eec\u5f00\u59cb\u5427\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e00\u3001\u4ec0\u4e48\u662f\u6570\u636e\u7ed3\u6784<\/h2>\n<p style=\"margin: 1em 0px;\">\u9ad8\u5c42\u6570\u636e\u7ed3\u6784\u662f\u7528\u4e8e\u5b58\u50a8\u548c\u7ec4\u7ec7\u6570\u636e\u7684\u6280\u672f\uff0c\u8fd9\u4e9b\u6570\u636e\u4f7f\u4fee\u6539\uff0c\u5bfc\u822a\u548c\u8bbf\u95ee\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002\u6570\u636e\u7ed3\u6784\u51b3\u5b9a\u4e86\u5982\u4f55\u6536\u96c6\u6570\u636e\uff0c\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u8bbf\u95ee\u6570\u636e\u7684\u529f\u80fd\u4ee5\u53ca\u6570\u636e\u4e4b\u95f4\u7684\u5173\u7cfb\u3002\u6570\u636e\u7ed3\u6784\u51e0\u4e4e\u7528\u4e8e\u8ba1\u7b97\u673a\u79d1\u5b66\u548c\u7f16\u7a0b\u7684\u6240\u6709\u9886\u57df\uff0c\u4ece\u64cd\u4f5c\u7cfb\u7edf\u5230\u57fa\u672c\u7684\u7f16\u7801\u518d\u5230\u4eba\u5de5\u667a\u80fd\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6570\u636e\u7ed3\u6784\u4f7f\u6211\u4eec\u80fd\u591f\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u7ba1\u7406\u548c\u5229\u7528\u5927\u578b\u6570\u636e\u96c6<\/section>\n<\/li>\n<li>\n<section>\u4ece\u6570\u636e\u5e93\u4e2d\u641c\u7d22\u7279\u5b9a\u6570\u636e<\/section>\n<\/li>\n<li>\n<section>\u9488\u5bf9\u7279\u5b9a\u7a0b\u5e8f\u91cf\u8eab\u5b9a\u5236\u7684\u8bbe\u8ba1\u7b97\u6cd5<\/section>\n<\/li>\n<li>\n<section>\u4e00\u6b21\u5904\u7406\u6765\u81ea\u7528\u6237\u7684\u591a\u4e2a\u8bf7\u6c42<\/section>\n<\/li>\n<li>\n<section>\u7b80\u5316\u5e76\u52a0\u901f\u6570\u636e\u5904\u7406<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u6570\u636e\u7ed3\u6784\u5bf9\u4e8e\u6709\u6548\uff0c\u73b0\u5b9e\u5730\u89e3\u51b3\u95ee\u9898\u81f3\u5173\u91cd\u8981\u3002\u6bd5\u7adf\uff0c\u6211\u4eec\u7ec4\u7ec7\u6570\u636e\u7684\u65b9\u5f0f\u5bf9\u6027\u80fd\u548c\u53ef\u7528\u6027\u6709\u5f88\u5927\u5f71\u54cd\u3002\u5b9e\u9645\u4e0a\uff0c\u5927\u591a\u6570\u9876\u7ea7\u516c\u53f8\u90fd\u9700\u8981\u5bf9\u6570\u636e\u7ed3\u6784\u6709\u6df1\u523b\u7684\u4e86\u89e3\u3002\u8fd9\u4e9b\u6280\u80fd\u8bc1\u660e\u4f60\u77e5\u9053\u5982\u4f55\u6709\u6548\u5730\u7ba1\u7406\u6570\u636e\u3002\u4efb\u4f55\u60f3\u8981\u7834\u89e3\u7f16\u7801\u9762\u8bd5\u7684\u4eba\u90fd\u9700\u8981\u638c\u63e1\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p style=\"margin: 1em 0px;\">JavaScript\u5177\u6709\u539f\u59cb\u548c\u975e\u539f\u59cb\u6570\u636e\u7ed3\u6784\u3002\u539f\u59cb\u6570\u636e\u7ed3\u6784\u548c\u6570\u636e\u7c7b\u578b\u662f\u7f16\u7a0b\u8bed\u8a00\u56fa\u6709\u7684\u3002\u8fd9\u4e9b\u5305\u62ec\u5e03\u5c14\u503c\uff0c\u7a7a\u503c\uff0c\u6570\u5b57\uff0c\u5b57\u7b26\u4e32\u7b49\u3002\u975e\u539f\u59cb\u6570\u636e\u7ed3\u6784\u4e0d\u662f\u7531\u7f16\u7a0b\u8bed\u8a00\u5b9a\u4e49\u7684\uff0c\u800c\u662f\u7531\u7a0b\u5e8f\u5458\u5b9a\u4e49\u7684\u3002\u8fd9\u4e9b\u5305\u62ec\u7ebf\u6027\u6570\u636e\u7ed3\u6784\uff0c\u9759\u6001\u6570\u636e\u7ed3\u6784\u548c\u52a8\u6001\u6570\u636e\u7ed3\u6784\uff0c\u4f8b\u5982\u961f\u5217\u548c\u94fe\u63a5\u5217\u8868\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u73b0\u5728\u4f60\u5df2\u7ecf\u4e86\u89e3\u4e86\u4e3a\u4ec0\u4e48\u6570\u636e\u7ed3\u6784\u90a3\u4e48\u91cd\u8981\u4e86\uff0c\u63a5\u4e0b\u6765\u6211\u4eec\u5c31\u6765\u8ba8\u8bba\u4e00\u4e0b\u6bcf\u4e2aJavaScript\u5f00\u53d1\u4eba\u5458\u90fd\u9700\u8981\u77e5\u9053\u76847\u79cd\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e8c\u3001\u4f60\u9700\u8981\u77e5\u9053\u7684JavaScript\u6570\u636e\u7ed3\u6784<\/h2>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">1\u3001Array\uff08\u6570\u7ec4\uff09<\/h3>\n<p style=\"margin: 1em 0px;\">\u6570\u7ec4\u662f\u6240\u6709\u6570\u636e\u7ed3\u6784\u4e2d\u6700\u57fa\u672c\u7684\uff0c\u5b83\u4e3b\u8981\u5c06\u6570\u636e\u5b58\u50a8\u5728\u5185\u5b58\u4e2d\u4f9b\u4ee5\u540e\u4f7f\u7528\u3002\u6bcf\u4e2a\u6570\u7ec4\u90fd\u6709\u56fa\u5b9a\u6570\u91cf\u7684\u5355\u5143\u683c\uff08\u53d6\u51b3\u4e8e\u5176\u521b\u5efa\uff09\uff0c\u5e76\u4e14\u6bcf\u4e2a\u5355\u5143\u683c\u90fd\u6709\u7528\u4e8e\u9009\u62e9\u5176\u6570\u636e\u7684\u76f8\u5e94\u6570\u5b57\u7d22\u5f15\u3002\u6bcf\u5f53\u4f60\u60f3\u8981\u4f7f\u7528\u6570\u7ec4\u65f6\uff0c\u4f60\u5c31\u53ef\u4ee5\u8bbf\u95ee\u5176\u4e2d\u7684\u4efb\u4f55\u6570\u636e\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406191229.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2570\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406191229.png\" alt=\"20200406191229\" width=\"538\" height=\"137\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4f18\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u6613\u4e8e\u521b\u5efa\u548c\u4f7f\u7528\u3002<\/section>\n<\/li>\n<li>\n<section>\u590d\u6742\u6570\u636e\u7ed3\u6784\u7684\u57fa\u7840\u6784\u5efa\u5757<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7f3a\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u56fa\u5b9a\u5c3a\u5bf8<\/section>\n<\/li>\n<li>\n<section>\u63d2\u5165\/\u5220\u9664\u6216\u91cd\u65b0\u6392\u5e8f\u503c\u6602\u8d35<\/section>\n<\/li>\n<li>\n<section>\u6392\u5e8f\u6548\u7387\u4f4e\u4e0b<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u5e94\u7528\u9886\u57df<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u57fa\u672c\u7535\u5b50\u8868\u683c<\/section>\n<\/li>\n<li>\n<section>\u5728\u590d\u6742\u7684\u7ed3\u6784\u4e2d\uff0c\u4f8b\u5982\u54c8\u5e0c\u8868<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u6709\u5173\u66f4\u6df1\u5165\u7684\u8bf4\u660e\uff0c\u8bf7\u53c2\u9605\u6709\u5173\u6570\u7ec4\u7684Edpresso\u6587\u7ae0\uff01\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/edpresso\/what-are-arrays-in-javascript\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/edpresso\/what-are-arrays-in-javascript<\/a>\uff09<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">2\u3001Queues\uff08\u961f\u5217\uff09<\/h3>\n<p style=\"margin: 1em 0px;\">\u961f\u5217\u5728\u6982\u5ff5\u4e0a\u7c7b\u4f3c\u4e8e\u5806\u6808\u3002\u4e24\u8005\u90fd\u662f\u987a\u5e8f\u7ed3\u6784\uff0c\u4f46\u6309\u8f93\u5165\u987a\u5e8f\u800c\u4e0d\u662f\u6700\u65b0\u5143\u7d20\u5bf9\u5904\u7406\u5143\u7d20\u8fdb\u884c\u6392\u961f\u3002\u7ed3\u679c\uff0c\u53ef\u4ee5\u5c06\u961f\u5217\u89c6\u4e3a\u5806\u6808\u7684FIFO\uff08\u5148\u8fdb\u5148\u51fa\uff09\u7248\u672c\u3002\u8fd9\u4e9b\u4f5c\u4e3a\u8bf7\u6c42\u7684\u7f13\u51b2\u533a\u5f88\u6709\u7528\uff0c\u6309\u7167\u63a5\u6536\u5230\u7684\u987a\u5e8f\u5b58\u50a8\u6bcf\u4e2a\u8bf7\u6c42\uff0c\u76f4\u5230\u53ef\u4ee5\u5904\u7406\u4e3a\u6b62\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192020.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2573\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192020.png\" alt=\"20200406192020\" width=\"538\" height=\"335\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u4e3a\u4e86\u83b7\u5f97\u89c6\u89c9\u6548\u679c\uff0c\u8bf7\u8003\u8651\u5355\u8f66\u9053\u96a7\u9053\uff1a\u7b2c\u4e00\u4e2a\u8fdb\u5165\u96a7\u9053\u7684\u6c7d\u8f66\uff0c\u4e00\u5b9a\u662f\u7b2c\u4e00\u4e2a\u79bb\u5f00\u7684\u6c7d\u8f66\u3002\u5982\u679c\u5176\u4ed6\u6c7d\u8f66\u5e0c\u671b\u9000\u51fa\u4f46\u5148\u505c\u8f66\uff0c\u5219\u6240\u6709\u6c7d\u8f66\u90fd\u5fc5\u987b\u7b49\u5f85\u5148\u9000\u51fa\u624d\u80fd\u7ee7\u7eed\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4f18\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u52a8\u6001\u5c3a\u5bf8<\/section>\n<\/li>\n<li>\n<section>\u6309\u63a5\u6536\u987a\u5e8f\u8ba2\u8d2d\u6570\u636e<\/section>\n<\/li>\n<li>\n<section>\u8fd0\u884c\u65f6\u95f4\u77ed<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7f3a\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u53ea\u80fd\u68c0\u7d22\u6700\u65e9\u7684\u5143\u7d20<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u5e94\u7528\u9886\u57df<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u5728\u63a5\u6536\u9891\u7e41\u6570\u636e\u65f6\u4f5c\u4e3a\u7f13\u51b2\u533a\u6709\u6548<\/section>\n<\/li>\n<li>\n<section>\u5b58\u50a8\u8ba2\u5355\u654f\u611f\u6570\u636e\uff08\u5982\u5b58\u50a8\u7684\u8bed\u97f3\u90ae\u4ef6\uff09\u7684\u4fbf\u6377\u65b9\u6cd5<\/section>\n<\/li>\n<li>\n<section>\u786e\u4fdd\u6700\u65e9\u7684\u6570\u636e\u5148\u88ab\u5904\u7406<\/section>\n<\/li>\n<\/ul>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">3\u3001Linked List\uff08\u94fe\u8868\uff09<\/h3>\n<p style=\"margin: 1em 0px;\">\u94fe\u63a5\u5217\u8868\u662f\u4e00\u79cd\u6570\u636e\u7ed3\u6784\uff0c\u4e0e\u524d\u4e09\u4e2a\u5217\u8868\u4e0d\u540c\uff0c\u5b83\u4e0d\u4f7f\u7528\u6570\u636e\u5728\u5185\u5b58\u4e2d\u7684\u7269\u7406\u653e\u7f6e\u3002\u8fd9\u610f\u5473\u7740\u94fe\u63a5\u5217\u8868\u800c\u4e0d\u662f\u7d22\u5f15\u6216\u4f4d\u7f6e\uff0c\u800c\u662f\u4f7f\u7528\u5f15\u7528\u7cfb\u7edf\uff1a\u5143\u7d20\u5b58\u50a8\u5728\u5305\u542b\u6307\u5411\u4e0b\u4e00\u4e2a\u8282\u70b9\u7684\u6307\u9488\u7684\u8282\u70b9\u4e2d\uff0c\u91cd\u590d\u76f4\u5230\u6240\u6709\u8282\u70b9\u90fd\u94fe\u63a5\u4e3a\u6b62\u3002\u8be5\u7cfb\u7edf\u65e0\u9700\u91cd\u65b0\u7ec4\u7ec7\u5373\u53ef\u6709\u6548\u5730\u63d2\u5165\u548c\u53d6\u51fa\u7269\u54c1\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192043.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2574\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192043.png\" alt=\"20200406192043\" width=\"447\" height=\"243\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4f18\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u6709\u6548\u63d2\u5165\u548c\u5220\u9664\u65b0\u5143\u7d20<\/section>\n<\/li>\n<li>\n<section>\u91cd\u7ec4\u6570\u7ec4\u7b80\u5355<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7f3a\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u6bd4\u6570\u7ec4\u4f7f\u7528\u66f4\u591a\u7684\u5185\u5b58<\/section>\n<\/li>\n<li>\n<section>\u68c0\u7d22\u7279\u5b9a\u5143\u7d20\u6548\u7387\u4f4e\u4e0b<\/section>\n<\/li>\n<li>\n<section>\u5411\u540e\u904d\u5386\u5217\u8868\u6548\u7387\u4f4e\u4e0b<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u5e94\u7528\u9886\u57df<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u6700\u9002\u5408\u5728\u5fc5\u987b\u5feb\u901f\u8fde\u7eed\u4ece\u672a\u77e5\u4f4d\u7f6e\u6dfb\u52a0\u548c\u5220\u9664\u6570\u636e\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u6709\u5173\u66f4\u6df1\u5165\u7684\u8bf4\u660e\uff0c\u8bf7\u53c2\u9605\u94fe\u63a5\u5217\u8868\u4e0a\u7684Edpresso\u6587\u7ae0\uff01\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/edpresso\/what-is-a-linked-list\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/edpresso\/what-is-a-linked-list<\/a>\uff09<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">4\u3001Tree\uff08\u6811\uff09<\/h3>\n<p style=\"margin: 1em 0px;\">\u6811\u662f\u53e6\u4e00\u79cd\u57fa\u4e8e\u5173\u7cfb\u7684\u6570\u636e\u7ed3\u6784\uff0c\u4e13\u95e8\u7528\u4e8e\u8868\u793a\u5c42\u6b21\u7ed3\u6784\u3002\u50cf\u94fe\u8868\u4e00\u6837\uff0c\u8282\u70b9\u5305\u542b\u6570\u636e\u5143\u7d20\u548c\u6307\u793a\u5176\u4e0e\u76f4\u63a5\u8282\u70b9\u5173\u7cfb\u7684\u6307\u9488\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6bcf\u68f5\u6811\u90fd\u6709\u4e00\u4e2a\u201c\u6839\u201d\u8282\u70b9\uff0c\u6240\u6709\u5176\u4ed6\u8282\u70b9\u90fd\u4ece\u8be5\u201c\u6839\u201d\u8282\u70b9\u5206\u652f\u3002\u6839\u5305\u542b\u5bf9\u76f4\u63a5\u5728\u5176\u4e0b\u7684\u6240\u6709\u5143\u7d20\u7684\u5f15\u7528\uff0c\u8fd9\u4e9b\u5143\u7d20\u79f0\u4e3a\u201c\u5b50\u8282\u70b9\u201d\u3002\u968f\u7740\u6bcf\u4e2a\u5b50\u8282\u70b9\u7ee7\u7eed\u5206\u652f\u5230\u66f4\u591a\u7684\u5b50\u8282\u70b9\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5177\u6709\u94fe\u63a5\u7684\u5b50\u8282\u70b9\u7684\u8282\u70b9\u79f0\u4e3a\u5185\u90e8\u8282\u70b9\uff0c\u800c\u6ca1\u6709\u5b50\u8282\u70b9\u7684\u8282\u70b9\u79f0\u4e3a\u5916\u90e8\u8282\u70b9\u3002\u5e38\u89c1\u7684\u6811\u7c7b\u578b\u662f\u201c\u4e8c\u8fdb\u5236\u641c\u7d22\u6811\u201d\uff0c\u7528\u4e8e\u8f7b\u677e\u641c\u7d22\u5b58\u50a8\u7684\u6570\u636e\u3002\u8fd9\u4e9b\u641c\u7d22\u64cd\u4f5c\u975e\u5e38\u9ad8\u6548\uff0c\u56e0\u4e3a\u5176\u641c\u7d22\u6301\u7eed\u65f6\u95f4\u4e0d\u53d6\u51b3\u4e8e\u8282\u70b9\u6570\uff0c\u800c\u662f\u53d6\u51b3\u4e8e\u6811\u4e0b\u7684\u5c42\u6570\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192109.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2575\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192109.png\" alt=\"20200406192109\" width=\"555\" height=\"423\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u8fd9\u79cd\u7c7b\u578b\u7684\u6811\u7531\u56db\u4e2a\u4e25\u683c\u89c4\u5219\u5b9a\u4e49\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u5de6\u5b50\u6811\u4ec5\u5305\u542b\u5143\u7d20\u5c0f\u4e8e\u6839\u7684\u8282\u70b9\u3002<\/section>\n<\/li>\n<li>\n<section>\u53f3\u4fa7\u5b50\u6811\u4ec5\u5305\u542b\u5143\u7d20\u5927\u4e8e\u6839\u7684\u8282\u70b9\u3002<\/section>\n<\/li>\n<li>\n<section>\u5de6\u548c\u53f3\u5b50\u6811\u4e5f\u5fc5\u987b\u662f\u4e8c\u53c9\u641c\u7d22\u6811\u3002\u4ed6\u4eec\u5fc5\u987b\u9075\u5faa\u4e0a\u8ff0\u89c4\u5219\u5e76\u4ee5\u5176\u6811\u7684\u201c\u6839\u201d\u4f5c\u4e3a\u6839\u3002<\/section>\n<\/li>\n<li>\n<section>\u4e0d\u80fd\u6709\u91cd\u590d\u7684\u8282\u70b9\uff0c\u5373\u4e24\u4e2a\u8282\u70b9\u4e0d\u80fd\u5177\u6709\u76f8\u540c\u7684\u503c\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4f18\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u5b58\u50a8\u5206\u5c42\u5173\u7cfb\u7684\u7406\u60f3\u9009\u62e9<\/section>\n<\/li>\n<li>\n<section>\u52a8\u6001\u5c3a\u5bf8<\/section>\n<\/li>\n<li>\n<section>\u5feb\u901f\u63d2\u5165\u548c\u5220\u9664\u64cd\u4f5c<\/section>\n<\/li>\n<li>\n<section>\u5728\u4e8c\u53c9\u641c\u7d22\u6811\u4e2d\uff0c\u63d2\u5165\u7684\u8282\u70b9\u4f1a\u7acb\u5373\u6392\u5e8f\u3002<\/section>\n<\/li>\n<li>\n<section>\u4e8c\u8fdb\u5236\u641c\u7d22\u6811\u53ef\u4ee5\u6709\u6548\u5730\u8fdb\u884c\u641c\u7d22\uff1b\u957f\u5ea6\u4ec5\u4e3a0\uff08\u9ad8\u5ea6\uff09\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7f3a\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u7f13\u6162\u91cd\u65b0\u6392\u5217\u8282\u70b9<\/section>\n<\/li>\n<li>\n<section>\u5b50\u8282\u70b9\u4e0d\u4fdd\u7559\u6709\u5173\u5176\u7236\u8282\u70b9\u7684\u4fe1\u606f<\/section>\n<\/li>\n<li>\n<section>\u4e8c\u8fdb\u5236\u641c\u7d22\u6811\u4e0d\u5982\u66f4\u590d\u6742\u7684\u54c8\u5e0c\u8868\u5feb<\/section>\n<\/li>\n<li>\n<section>\u5982\u679c\u672a\u4f7f\u7528\u5e73\u8861\u5b50\u6811\u5b9e\u73b0\uff0c\u5219\u4e8c\u53c9\u641c\u7d22\u6811\u53ef\u4ee5\u9000\u5316\u4e3a\u7ebf\u6027\u641c\u7d22\uff08\u626b\u63cf\u6240\u6709\u5143\u7d20\uff09\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u5e94\u7528\u9886\u57df<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u5b58\u50a8\u5206\u5c42\u6570\u636e\uff0c\u4f8b\u5982\u6587\u4ef6\u4f4d\u7f6e\u3002<\/section>\n<\/li>\n<li>\n<section>\u4e8c\u8fdb\u5236\u641c\u7d22\u6811\u975e\u5e38\u9002\u5408\u9700\u8981\u641c\u7d22\u6216\u6392\u5e8f\u6570\u636e\u7684\u4efb\u52a1\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u6709\u5173\u66f4\u6df1\u5165\u7684\u89e3\u91ca\uff0c\u8bf7\u53c2\u9605\u6709\u5173\u6811\u6728\u7684Edpresso\u6587\u7ae0\uff01\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/edpresso\/what-is-a-tree\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/edpresso\/what-is-a-tree<\/a>\uff09<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">5\u3001Graph\uff08\u56fe\uff09<\/h3>\n<p style=\"margin: 1em 0px;\">\u56fe\u8868\u662f\u57fa\u4e8e\u5173\u7cfb\u7684\u6570\u636e\u7ed3\u6784\uff0c\u6709\u52a9\u4e8e\u5b58\u50a8\u7c7b\u4f3cWeb\u7684\u5173\u7cfb\u3002\u5728\u56fe\u4e2d\u79f0\u4e3a\u6bcf\u4e2a\u8282\u70b9\u6216\u9876\u70b9\uff0c\u90fd\u6709\u4e00\u4e2a\u6807\u9898\uff08A\uff0cB\uff0cC\u7b49\uff09\uff0c\u5305\u542b\u7684\u503c\u4ee5\u53ca\u4e0e\u5176\u4ed6\u9876\u70b9\u7684\u94fe\u63a5\uff08\u79f0\u4e3a\u8fb9\uff09\u5217\u8868\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192135.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2576\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192135.png\" alt=\"20200406192135\" width=\"477\" height=\"374\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6bcf\u4e2a\u5706\u662f\u4e00\u4e2a\u9876\u70b9\uff0c\u6bcf\u6761\u7ebf\u662f\u4e00\u6761\u8fb9\u3002\u5982\u679c\u662f\u4e66\u9762\u5f62\u5f0f\uff0c\u5219\u6b64\u7ed3\u6784\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p style=\"margin: 1em 0px;\">V = {a\uff0cb\uff0cc\uff0cd}<\/p>\n<p style=\"margin: 1em 0px;\">E = {ab\uff0cac\uff0cbc\uff0ccd}<\/p>\n<p style=\"margin: 1em 0px;\">\u5c3d\u7ba1\u4e00\u5f00\u59cb\u5f88\u96be\u76f4\u89c2\u663e\u793a\uff0c\u4f46\u8fd9\u79cd\u7ed3\u6784\u5bf9\u4e8e\u4ee5\u6587\u672c\u5f62\u5f0f\u4f20\u8fbe\u5173\u7cfb\u56fe\uff08\u4ece\u7535\u8def\u5230\u8bad\u7ec3\u7f51\u7edc\uff09\u7684\u4ef7\u503c\u800c\u8a00\uff0c\u90fd\u662f\u975e\u5e38\u5b9d\u8d35\u7684\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4f18\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u53ef\u4ee5\u901a\u8fc7\u6587\u5b57\u5feb\u901f\u4f20\u8fbe\u89c6\u89c9\u6548\u679c<\/section>\n<\/li>\n<li>\n<section>\u53ef\u7528\u4e8e\u5efa\u6a21\u591a\u79cd\u4e3b\u9898\uff0c\u53ea\u8981\u5b83\u4eec\u5305\u542b\u5173\u7cfb\u7ed3\u6784<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7f3a\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u5728\u66f4\u9ad8\u7684\u7ea7\u522b\u4e0a\uff0c\u5c06\u6587\u672c\u8f6c\u6362\u4e3a\u56fe\u50cf\u53ef\u80fd\u4f1a\u5f88\u8017\u65f6\u3002<\/section>\n<\/li>\n<li>\n<section>\u53ef\u80fd\u5f88\u96be\u770b\u5230\u73b0\u6709\u7684\u8fb9\u6216\u7ed9\u5b9a\u9876\u70b9\u5df2\u8fde\u63a5\u591a\u5c11\u6761\u8fb9<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u5e94\u7528\u9886\u57df<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u7f51\u7edc\u8868\u793a<\/section>\n<\/li>\n<li>\n<section>\u5efa\u6a21\u793e\u4ea4\u7f51\u7edc\uff0c\u4f8b\u5982Facebook\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u6709\u5173\u66f4\u6df1\u5165\u7684\u8bf4\u660e\uff0c\u8bf7\u53c2\u9605\u6709\u5173\u56fe\u8868\u7684Edpresso\u6587\u7ae0\uff01\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/edpresso\/what-is-a-graph-data-structure\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/edpresso\/what-is-a-graph-data-structure<\/a>\uff09<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">6\u3001\u54c8\u5e0c\u8868\uff08\u5730\u56fe\uff09<\/h3>\n<p style=\"margin: 1em 0px;\">\u54c8\u5e0c\u8868\u662f\u4e00\u4e2a\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\uff0c\u80fd\u591f\u5b58\u50a8\u5927\u91cf\u4fe1\u606f\u5e76\u6709\u6548\u5730\u68c0\u7d22\u7279\u5b9a\u5143\u7d20\u3002\u8be5\u6570\u636e\u7ed3\u6784\u4f9d\u8d56\u4e8e\u952e\/\u503c\u5bf9\u7684\u6982\u5ff5\uff0c\u5176\u4e2d\u201c\u952e\u201d\u662f\u641c\u7d22\u5230\u7684\u5b57\u7b26\u4e32\uff0c\u201c\u503c\u201d\u662f\u4e0e\u8be5\u952e\u914d\u5bf9\u7684\u6570\u636e\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192155.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2577\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192155.png\" alt=\"20200406192155\" width=\"513\" height=\"199\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u4f7f\u7528\u9884\u5b9a\u4e49\u7684\u54c8\u5e0c\u51fd\u6570\uff0c\u5c06\u6bcf\u4e2a\u641c\u7d22\u5230\u7684\u952e\u4ece\u5176\u5b57\u7b26\u4e32\u5f62\u5f0f\u8f6c\u6362\u4e3a\u79f0\u4e3a\u54c8\u5e0c\u7684\u6570\u503c\u3002\u7136\u540e\uff0c\u6b64\u54c8\u5e0c\u6307\u5411\u5b58\u50a8\u6876-\u8868\u4e2d\u8f83\u5c0f\u7684\u5b50\u7ec4\u3002\u7136\u540e\uff0c\u5b83\u5c06\u5728\u5b58\u50a8\u6876\u4e2d\u641c\u7d22\u6700\u521d\u8f93\u5165\u7684\u952e\uff0c\u5e76\u8fd4\u56de\u4e0e\u8be5\u952e\u5173\u8054\u7684\u503c\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4f18\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u952e\u53ef\u4ee5\u91c7\u7528\u4efb\u4f55\u5f62\u5f0f\uff0c\u800c\u6570\u7ec4\u7684\u7d22\u5f15\u5fc5\u987b\u4e3a\u6574\u6570<\/section>\n<\/li>\n<li>\n<section>\u9ad8\u6548\u7684\u641c\u7d22\u529f\u80fd<\/section>\n<\/li>\n<li>\n<section>\u6bcf\u6b21\u641c\u7d22\u7684\u64cd\u4f5c\u6b21\u6570\u4e0d\u53d8<\/section>\n<\/li>\n<li>\n<section>\u63d2\u5165\u6216\u5220\u9664\u64cd\u4f5c\u7684\u56fa\u5b9a\u6210\u672c<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7f3a\u70b9<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u51b2\u7a81\uff1a\u4e24\u4e2a\u952e\u8f6c\u6362\u4e3a\u76f8\u540c\u7684\u54c8\u5e0c\u7801\u6216\u4e24\u4e2a\u54c8\u5e0c\u7801\u6307\u5411\u76f8\u540c\u503c\u65f6\u5f15\u8d77\u7684\u9519\u8bef\u3002<\/section>\n<\/li>\n<li>\n<section>\u8fd9\u4e9b\u9519\u8bef\u53ef\u80fd\u5f88\u5e38\u89c1\uff0c\u5e76\u4e14\u7ecf\u5e38\u9700\u8981\u5bf9\u54c8\u5e0c\u51fd\u6570\u8fdb\u884c\u5168\u9762\u68c0\u67e5\u3002<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u5e94\u7528\u9886\u57df<\/strong><\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u6570\u636e\u5e93\u5b58\u50a8<\/section>\n<\/li>\n<li>\n<section>\u6309\u540d\u79f0\u67e5\u627e\u5730\u5740<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u4ece\u952e\u548c\u503c\u7684\u7c7b\u578b\u5230\u5176\u54c8\u5e0c\u51fd\u6570\u7684\u5de5\u4f5c\u65b9\u5f0f\uff0c\u6bcf\u4e2a\u54c8\u5e0c\u8868\u90fd\u53ef\u4ee5\u6709\u5f88\u5927\u4e0d\u540c\u3002\u7531\u4e8e\u8fd9\u4e9b\u5dee\u5f02\u4ee5\u53ca\u54c8\u5e0c\u8868\u7684\u591a\u5c42\u65b9\u9762\uff0c\u51e0\u4e4e\u4e0d\u53ef\u80fd\u5982\u6b64\u6982\u62ec\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6709\u5173\u66f4\u6df1\u5165\u7684\u8bf4\u660e\uff0c\u8bf7\u53c2\u9605\u6709\u5173\u54c8\u5e0c\u8868\u7684Edpresso\u6587\u7ae0\uff01\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/edpresso\/what-is-a-hash-table\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/edpresso\/what-is-a-hash-table<\/a>\uff09<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u7ee7\u7eed\u5b66\u4e60\u3002<\/strong><\/p>\n<p style=\"margin: 1em 0px;\">\u5b66\u4e60JavaScript\u6570\u636e\u7ed3\u6784\uff0c\u800c\u65e0\u9700\u904d\u5386\u89c6\u9891\u6216\u6587\u6863\u3002Educative\u7684\u57fa\u4e8e\u6587\u672c\u7684\u8bfe\u7a0b\u6613\u4e8e\u6d4f\u89c8\uff0c\u5e76\u5177\u6709\u5b9e\u65f6\u7f16\u7801\u73af\u5883-\u4f7f\u5b66\u4e60\u5feb\u901f\u9ad8\u6548\u3002<\/p>\n<p style=\"margin: 1em 0px;\">JavaScript\u4e2d\u7684\u6570\u636e\u7ed3\u6784\uff1a\u9762\u8bd5\u590d\u4e60\uff08\u5730\u5740:<a class=\"url\" href=\"https:\/\/www.educative.io\/courses\/data-structures-in-javascript-an-interview-refresher\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/courses\/data-structures-in-javascript-an-interview-refresher<\/a>)<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e09\u3001\u6570\u636e\u7ed3\u6784\u9762\u8bd5\u9898<\/h2>\n<p style=\"margin: 1em 0px;\">\u5bf9\u4e8e\u8bb8\u591a\u5f00\u53d1\u4eba\u5458\u548c\u7a0b\u5e8f\u5458\u800c\u8a00\uff0c\u6570\u636e\u7ed3\u6784\u5bf9\u4e8e\u7834\u89e3\u7f16\u7a0b\u9762\u8bd5\u81f3\u5173\u91cd\u8981\u3002\u6709\u5173\u6570\u636e\u7ed3\u6784\u7684\u95ee\u9898\u662f\u73b0\u4ee3\u7f16\u7a0b\u5f00\u53d1\u9762\u8bd5\u4e2d\u7684\u57fa\u7840\u3002\u5b9e\u9645\u4e0a\uff0c\u5bf9\u4e8e\u4f60\u7684\u5e94\u8058\u80fd\u529b\u548c\u5165\u95e8\u7ea7\u804c\u4f4d\uff0c\u6709\u5f88\u591a\u8bdd\u8981\u8bf4\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4eca\u5929\uff0c\u6211\u4eec\u5c06\u8ba8\u8bbaJavaScript\u6570\u636e\u7ed3\u6784\u7684\u4e03\u4e2a\u5e38\u89c1\u7f16\u7801\u9762\u8bd5\u95ee\u9898\uff0c\u9488\u5bf9\u6211\u4eec\u4e0a\u9762\u8ba8\u8bba\u7684\u6bcf\u4e2a\u6570\u636e\u7ed3\u6784\u3002\u6bcf\u4e2a\u4eba\u8fd8\u5c06\u57fa\u4e8eBigO\u7b26\u53f7\u7406\u8bba\u8ba8\u8bba\u5176\u65f6\u95f4\u590d\u6742\u5ea6\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">1\u3001\u6570\u7ec4\uff1a\u4ece\u6570\u7ec4\u4e2d\u5220\u9664\u6240\u6709\u5076\u6570\u6574\u6570<\/h3>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u95ee\u9898\u9648\u8ff0\uff1a<\/strong>\u5b9e\u73b0\u4e00\u4e2a\u51fd\u6570removeEven\uff08arr\uff09\uff0c\u8be5\u51fd\u6570\u5728\u5176\u8f93\u5165\u4e2d\u4f7f\u7528\u6570\u7ec4arr\u5e76\u4ece\u7ed9\u5b9a\u6570\u7ec4\u4e2d\u5220\u9664\u6240\u6709\u5076\u6570\u5143\u7d20\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u5165\uff1a\u968f\u673a\u6574\u6570\u6570\u7ec4<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">[1,2,4,5,10,6,3]<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a\u4ec5\u5305\u542b\u5947\u6570\u6574\u6570\u7684\u6570\u7ec4<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">[1,5,3]<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u4f60\u53ef\u4ee5\u901a\u8fc7\u4e24\u79cd\u65b9\u5f0f\u89e3\u51b3\u9762\u8bd5\u4e2d\u7684\u95ee\u9898\u3002\u8ba9\u6211\u4eec\u8ba8\u8bba\u4e00\u4e0b\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u89e3\u51b3\u65b9\u68481\uff1a\u201c\u624b\u52a8\u201d\u6267\u884c<\/h3>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192238.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2578\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192238.png\" alt=\"20200406192238\" width=\"1064\" height=\"307\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u6b64\u65b9\u6cd5\u4ece\u6570\u7ec4\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u5f00\u59cb\u3002\u5982\u679c\u5f53\u524d\u5143\u7d20\u4e0d\u662f\u5076\u6570\uff0c\u5b83\u5c06\u628a\u8be5\u5143\u7d20\u63a8\u5165\u65b0\u6570\u7ec4\u3002\u5982\u679c\u662f\u5076\u6570\uff0c\u5b83\u5c06\u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u5143\u7d20\uff0c\u91cd\u590d\u76f4\u5230\u5230\u8fbe\u6570\u7ec4\u7684\u672b\u5c3e\u3002\u5173\u4e8e\u65f6\u95f4\u590d\u6742\u5ea6\uff0c\u7531\u4e8e\u5fc5\u987b\u8fed\u4ee3\u6574\u4e2a\u6570\u7ec4\uff0c\u56e0\u6b64\u6b64\u89e3\u51b3\u65b9\u6848\u4f4d\u4e8eO\uff08n\uff09O\uff08n\uff09\u4e2d\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">\u89e3\u51b3\u65b9\u68482\uff1a\u4f7f\u7528filter\uff08\uff09\u548clambda\u51fd\u6570<\/h3>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192305.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2579\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/20200406192305.png\" alt=\"20200406192305\" width=\"854\" height=\"142\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u6b64\u89e3\u51b3\u65b9\u6848\u4e5f\u4ece\u7b2c\u4e00\u4e2a\u5143\u7d20\u5f00\u59cb\uff0c\u5e76\u68c0\u67e5\u5b83\u662f\u5426\u4e3a\u5076\u6570\u3002\u5982\u679c\u662f\u5076\u6570\uff0c\u5b83\u5c06\u6ee4\u9664\u6b64\u5143\u7d20\u3002\u5982\u679c\u4e0d\u662f\uff0c\u5219\u8df3\u5230\u4e0b\u4e00\u4e2a\u5143\u7d20\uff0c\u91cd\u590d\u6b64\u8fc7\u7a0b\uff0c\u76f4\u5230\u5230\u8fbe\u6570\u7ec4\u672b\u5c3e\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8fc7\u6ee4\u5668\u51fd\u6570\u4f7f\u7528lambda\u6216arrow\u51fd\u6570\uff0c\u5b83\u4eec\u4f7f\u7528\u66f4\u77ed\uff0c\u66f4\u7b80\u5355\u7684\u8bed\u6cd5\u3002\u8fc7\u6ee4\u5668\u8fc7\u6ee4\u6389lambda\u51fd\u6570\u4e3a\u5176\u8fd4\u56defalse\u7684\u5143\u7d20\u3002\u5176\u65f6\u95f4\u590d\u6742\u5ea6\u4e0e\u5148\u524d\u89e3\u51b3\u65b9\u6848\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u76f8\u540c\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">2\u3001\u5806\u6808\uff1a\u4f7f\u7528\u5806\u6808\u68c0\u67e5\u62ec\u53f7\u662f\u5426\u5e73\u8861<\/h3>\n<p style=\"margin: 1em 0px;\">\u95ee\u9898\u9648\u8ff0\uff1a\u5b9e\u73b0isBalanced\uff08\uff09\u51fd\u6570\u4ee5\u4ec5\u5305\u542b\u5927\u62ec\u53f7{}\uff0c\u65b9\u62ec\u53f7[]\u548c\u5706\u62ec\u53f7\uff08\uff09\u7684\u5b57\u7b26\u4e32\u3002\u8be5\u51fd\u6570\u5e94\u544a\u8bc9\u6211\u4eec\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u62ec\u53f7\u662f\u5426\u5e73\u8861\u3002\u8fd9\u610f\u5473\u7740\u6bcf\u4e2a\u5f00\u5934\u62ec\u53f7\u90fd\u5c06\u6709\u4e00\u4e2a\u7ed3\u5c3e\u62ec\u53f7\u3002\u4f8b\u5982\uff0c{[]}\u662f\u5e73\u8861\u7684\uff0c\u800c{[}]\u4e0d\u662f\u5e73\u8861\u7684\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u5165\uff1a\u4ec5\u7531\uff08\uff0c\uff09\uff0c{\uff0c}\uff0c[\u548c]\u7ec4\u6210\u7684\u5b57\u7b26\u4e32<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">exp = \"{[({})]}\"<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a\u5982\u679c\u8868\u8fbe\u5f0f\u6ca1\u6709\u5e73\u8861\u7684\u62ec\u53f7\uff0c\u5219\u8fd4\u56deFalse\u3002\u5982\u679c\u662f\uff0c\u5219\u8be5\u51fd\u6570\u8fd4\u56deTrue\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">True<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u7b80\u5355\u5730\u4f7f\u7528\u4e00\u5806\u5b57\u7b26\u3002\u5728\u4e0b\u9762\u7684\u4ee3\u7801\u4e2d\u67e5\u770b\u5176\u5de5\u4f5c\u65b9\u5f0f\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">\"use strict\";\nconst Stack = require('.\/Stack.js');\n\nfunction isBalanced(exp) {\nvar myStack = new Stack();\n\/\/Iterate through the string exp\nfor (var i = 0; i &lt; exp.length; i++) {\n\/\/For every closing parenthesis check for its opening parenthesis in stack\n\n\nif (exp[i] == '}' || exp[i] == ')' || exp[i] == ']') {\n\nif (myStack.isEmpty()) {\n\nreturn false\n            }\nlet output = myStack.pop();\n\/\/If you can't find the opening parentheses for any closing one then returns false.\nif (((exp[i] == \"}\") &amp;&amp; (output != \"{\")) || ((exp[i] == \")\") &amp;&amp; (output != \"(\")) || ((exp[i] == \"]\") &amp;&amp; (output != \"[\"))) {\nreturn false;\n            }\n\n        } else {\n\/\/For each opening parentheses, push it into stack\n            myStack.push(exp[i]);\n        }\n\n    }\n\/\/after complete traversal of string exp, if there's any opening parentheses left\n\/\/in stack then also return false.\nif (myStack.isEmpty() == false) {\nreturn false\n    }\n\/\/At the end return true if you haven't encountered any of the above false conditions.\nreturn true\n}\n\n\nvar inputString = \"{[()]}\"\nconsole.log(inputString)\nconsole.log(isBalanced(inputString))\n\ninputString = \"{[([({))]}}\"\nconsole.log(inputString)\nconsole.log(isBalanced(inputString))\n<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">{[\uff08\uff09]}<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u771f\u6b63<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">{[\uff08[\uff08\uff08\uff08\uff09\uff09]}}<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u5047<\/p>\n<p style=\"margin: 1em 0px;\">\u8981\u67e5\u770b\u6b64\u89e3\u51b3\u65b9\u6848\u7684\u5176\u4f59\u4ee3\u7801\uff0c\u8bf7\u8f6c\u5230Educative.io\u5728\u5d4c\u5165\u5f0f\u73af\u5883\u4e2d\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6b64\u8fc7\u7a0b\u5c06\u4e00\u6b21\u904d\u5386\u5b57\u7b26\u4e32\u4e00\u4e2a\u5b57\u7b26\u3002\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u4e24\u4e2a\u56e0\u7d20\u786e\u5b9a\u5b57\u7b26\u4e32\u4e0d\u5e73\u8861\uff1a<\/p>\n<p style=\"margin: 1em 0px;\">\u5806\u6808\u4e3a\u7a7a\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5806\u6808\u4e2d\u7684\u9876\u90e8\u5143\u7d20\u4e0d\u662f\u6b63\u786e\u7684\u7c7b\u578b\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5982\u679c\u8fd9\u4e9b\u6761\u4ef6\u4e4b\u4e00\u6210\u7acb\uff0c\u5219\u8fd4\u56deFalse\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5982\u679c\u62ec\u53f7\u662f\u5f00\u62ec\u53f7\uff0c\u5219\u5c06\u5176\u63a8\u5165\u5806\u6808\u3002\u5982\u679c\u6700\u7ec8\u6240\u6709\u5e73\u8861\uff0c\u5219\u5806\u6808\u5c06\u4e3a\u7a7a\u3002\u5982\u679c\u4e0d\u4e3a\u7a7a\uff0c\u5219\u8fd4\u56deFalse\u3002\u7531\u4e8e\u6211\u4eec\u4ec5\u904d\u5386\u5b57\u7b26\u4e32exp\u4e00\u6b21\uff0c\u56e0\u6b64\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO\uff08n\uff09\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">3\u3001\u961f\u5217\uff1a\u751f\u6210\u4ece1\u5230n\u7684\u4e8c\u8fdb\u5236\u6570<\/h3>\n<p style=\"margin: 1em 0px;\">\u95ee\u9898\u9648\u8ff0\uff1a\u5b9e\u73b0\u4e00\u4e2a\u51fd\u6570findBin\uff08n\uff09\uff0c\u8be5\u51fd\u6570\u5c06\u4f7f\u7528\u961f\u5217\u4ee5\u5b57\u7b26\u4e32\u5f62\u5f0f\u751f\u6210\u4ece1\u5230n\u7684\u4e8c\u8fdb\u5236\u6570\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u5165\uff1a\u6b63\u6574\u6570n<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">n = 3<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a\u4ee51\u5230n\u7684\u5b57\u7b26\u4e32\u5f62\u5f0f\u8fd4\u56de\u4e8c\u8fdb\u5236\u6570<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">result = [\"1\",\"10\",\"11\"]<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u6700\u7b80\u5355\u65b9\u6cd5\u662f\u4f7f\u7528\u961f\u5217\u4ece\u4ee5\u524d\u7684\u53f7\u7801\u751f\u6210\u65b0\u53f7\u7801\u3002\u8ba9\u6211\u4eec\u5206\u89e3\u4e00\u4e0b\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">\"use strict\";\nconst Queue = require('.\/Queue.js');\nfunction findBin(n) {\nlet result = [];\nlet myQueue = new Queue();\nvar s1, s2;\n    myQueue.enqueue(\"1\");\nfor (var i = 0; i &lt; n; i++) {\n\n        result.push(myQueue.dequeue());\n        s1 = result[i] + \"0\";\n        s2 = result[i] + \"1\";\n\n        myQueue.enqueue(s1);\n        myQueue.enqueue(s2);\n\n    }\n\nreturn result;\n}\n\nconsole.log(findBin(10))\n<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">['1'\uff0c'10'\uff0c'11'\uff0c'100'\uff0c'101'\uff0c'110'\uff0c'111'\uff0c'1000'\uff0c'1001'\uff0c'1010']<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8981\u67e5\u770b\u6b64\u89e3\u51b3\u65b9\u6848\u7684\u5176\u4f59\u4ee3\u7801\uff0c\u8bf7\u8f6c\u5230Educative.io\u5728\u5d4c\u5165\u5f0f\u73af\u5883\u4e2d\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5173\u952e\u662f\u901a\u8fc7\u5c060\u548c1\u9644\u52a0\u5230\u5148\u524d\u7684\u4e8c\u8fdb\u5236\u6570\u6765\u751f\u6210\u8fde\u7eed\u7684\u4e8c\u8fdb\u5236\u6570\u3002\u6f84\u6e05\uff0c<\/p>\n<p style=\"margin: 1em 0px;\">\u5982\u679c\u5c060\u548c1\u9644\u52a0\u52301\uff0c\u5219\u53ef\u4ee5\u751f\u621010\u548c11\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5982\u679c\u5c060\u548c1\u9644\u52a0\u523010\uff0c\u5219\u4f1a\u751f\u6210100\u548c101\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e00\u65e6\u6211\u4eec\u751f\u6210\u4e86\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\uff0c\u5b83\u5c06\u88ab\u6392\u961f\u5230\u961f\u5217\u4e2d\uff0c\u8fd9\u6837\uff0c\u5f53\u6211\u4eec\u5c060\u548c1\u9644\u52a0\u5230\u961f\u5217\u4e2d\u65f6\uff0c\u5982\u679c\u6211\u4eec\u9644\u52a0\u4e860\u548c1\uff0c\u5c31\u53ef\u4ee5\u751f\u6210\u65b0\u7684\u4e8c\u8fdb\u5236\u6570\u3002\u7531\u4e8e\u961f\u5217\u9075\u5faa\u201c\u5148\u8fdb\u5148\u51fa\u201d\u5c5e\u6027\uff0c\u56e0\u6b64\u5c06\u6392\u961f\u7684\u4e8c\u8fdb\u5236\u6570\u51fa\u961f\uff0c\u4ee5\u4f7f\u6240\u5f97\u6570\u7ec4\u5728\u6570\u5b66\u4e0a\u6b63\u786e\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u770b\u4e0a\u9762\u7684\u4ee3\u7801\u3002\u5728\u7b2c7\u884c\uff0c\u5c061\u6392\u961f\u3002\u4e3a\u4e86\u751f\u6210\u4e8c\u8fdb\u5236\u6570\u5b57\u5e8f\u5217\uff0c\u5c06\u6570\u5b57\u51fa\u961f\u5e76\u5b58\u50a8\u5728\u6570\u7ec4\u7ed3\u679c\u4e2d\u3002\u5728\u7b2c11-12\u884c\uff0c\u6211\u4eec\u5c060\u548c1\u9644\u52a0\u8d77\u6765\u4ee5\u4ea7\u751f\u4e0b\u4e00\u4e2a\u6570\u5b57\u3002\u8fd9\u4e9b\u65b0\u6570\u5b57\u4e5f\u6392\u5728\u7b2c14-15\u884c\u3002\u961f\u5217\u5c06\u91c7\u7528\u6574\u6570\u503c\uff0c\u56e0\u6b64\u5b83\u5c06\u5728\u6392\u961f\u65f6\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8be5\u89e3\u51b3\u65b9\u6848\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO\uff08n\uff09O\uff08n\uff09\uff0c\u56e0\u4e3a\u6052\u5b9a\u65f6\u95f4\u64cd\u4f5c\u6267\u884c\u4e86n\u6b21\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">4\u3001\u94fe\u63a5\u5217\u8868\uff1a\u53cd\u5411\u94fe\u63a5\u5217\u8868<\/h3>\n<p style=\"margin: 1em 0px;\">\u95ee\u9898\u9648\u8ff0\uff1a\u7f16\u5199\u53cd\u5411\u51fd\u6570\u4ee5\u83b7\u53d6\u4e00\u4e2a\u5355\u94fe\u5217\u8868\u5e76\u5c06\u5176\u53cd\u5411\u5b9a\u4f4d\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u5165\uff1a\u5355\u94fe\u63a5\u5217\u8868<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">LinkedList = 0-&gt;1-&gt;2-&gt;3-4<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a\u53cd\u5411\u94fe\u63a5\u5217\u8868<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">LinkedList = 4-&gt;3-&gt;2-&gt;1-&gt;0<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u6700\u7b80\u5355\u65b9\u6cd5\u662f\u4f7f\u7528\u8fed\u4ee3\u6307\u9488\u64cd\u4f5c\u3002\u8ba9\u6211\u4eec\u6765\u770b\u770b\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">\"use strict\";\nconst LinkedList = require('.\/LinkedList.js');\nconst Node = require('.\/Node.js');\n\nfunction reverse(list) {\n  let previousNode = null;\n  let currentNode = list.getHead(); \/\/ The current node\n  let nextNode = null; \/\/ The next node in the list\n\n  \/\/Reversal\n  while (currentNode != null) {\n    nextNode = currentNode.nextElement;\n    currentNode.nextElement = previousNode;\n    previousNode = currentNode;\n    currentNode = nextNode;\n  }\n\n  \/\/Set the last element as the new head node\n  list.setHead(previousNode);\n\n}\n\nlet list = new LinkedList();\nlist.insertAtHead(4);\nlist.insertAtHead(9);\nlist.insertAtHead(6);\nlist.insertAtHead(1);\nlist.insertAtHead(0);\nlist.printList();\nreverse(list);\nlist.printList();\n<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">0-&gt; 1-&gt; 6-&gt; 9-&gt; 4-&gt;\u7a7a<\/code><\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">4-&gt; 9-&gt; 6-&gt; 1-&gt; 0-&gt;\u7a7a<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8981\u67e5\u770b\u6b64\u89e3\u51b3\u65b9\u6848\u7684\u5176\u4f59\u4ee3\u7801\uff0c\u8bf7\u8f6c\u5230Educative.io\u5728\u5d4c\u5165\u5f0f\u73af\u5883\u4e2d\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6211\u4eec\u4f7f\u7528\u5faa\u73af\u904d\u5386\u8f93\u5165\u5217\u8868\u3002\u5bf9\u4e8e\u5f53\u524d\u8282\u70b9\uff0c\u5176\u4e0e\u5148\u524d\u8282\u70b9\u7684\u94fe\u63a5\u88ab\u53cd\u5411\u3002\u7136\u540e\uff0cnext\u5c06\u4e0b\u4e00\u4e2a\u8282\u70b9\u5b58\u50a8\u5728\u5217\u8868\u4e2d\u3002\u8ba9\u6211\u4eec\u6309\u884c\u7ec6\u5206\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u7b2c22\u884c-\u5c06\u5f53\u524d\u8282\u70b9\u7684nextElement\u5b58\u50a8\u5728next\u4e2d<\/p>\n<p style=\"margin: 1em 0px;\">\u7b2c23\u884c-\u5c06\u5f53\u524d\u8282\u70b9\u7684nextElement\u8bbe\u7f6e\u4e3aPrevious<\/p>\n<p style=\"margin: 1em 0px;\">\u7b2c24\u884c-\u5c06\u5f53\u524d\u8282\u70b9\u8bbe\u4e3a\u65b0\u7684\u4e0a\u4e00\u4e2a\u8282\u70b9\uff0c\u4ee5\u8fdb\u884c\u4e0b\u4e00\u6b21\u8fed\u4ee3<\/p>\n<p style=\"margin: 1em 0px;\">\u7b2c25\u884c-\u4f7f\u7528next\u8f6c\u5230\u4e0b\u4e00\u4e2a\u8282\u70b9<\/p>\n<p style=\"margin: 1em 0px;\">\u7b2c29\u884c-\u6211\u4eec\u5c06\u5934\u6307\u9488\u91cd\u7f6e\u4e3a\u6307\u5411\u6700\u540e\u4e00\u4e2a\u8282\u70b9<\/p>\n<p style=\"margin: 1em 0px;\">\u7531\u4e8e\u5217\u8868\u4ec5\u88ab\u904d\u5386\u4e00\u6b21\uff0c\u56e0\u6b64\u8be5\u7b97\u6cd5\u4ee5O\uff08n\uff09\u8fd0\u884c\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">5\u3001\u6811\uff1a\u5728\u4e8c\u5206\u641c\u7d22\u6811\u4e2d\u627e\u5230\u6700\u5c0f\u503c<\/h3>\n<p style=\"margin: 1em 0px;\">\u95ee\u9898\u9648\u8ff0\uff1a\u4f7f\u7528findMin\uff08root\uff09\u51fd\u6570\u5728\u4e8c\u8fdb\u5236\u641c\u7d22\u6811\u4e2d\u67e5\u627e\u6700\u5c0f\u503c\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u5165\uff1a\u4e8c\u53c9\u641c\u7d22\u6811\u7684\u6839\u8282\u70b9<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">bst = {\n6 -&gt; 4,9\n4 -&gt; 2,5\n9 -&gt; 8,12\n12 -&gt; 10,14\n}\nwhere parent -&gt; leftChild,rightChild\n<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a\u8be5\u4e8c\u8fdb\u5236\u641c\u7d22\u6811\u4e2d\u7684\u6700\u5c0f\u6574\u6570\u503c<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">2<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8ba9\u6211\u4eec\u770b\u4e00\u4e2a\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u7684\u7b80\u5355\u65b9\u6cd5\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u89e3\u51b3\u65b9\u6848\uff1a\u8fed\u4ee3findMin\uff08\uff09<\/p>\n<p style=\"margin: 1em 0px;\">\u8be5\u89e3\u51b3\u65b9\u6848\u9996\u5148\u68c0\u67e5\u6839\u662f\u5426\u4e3a\u7a7a\u3002\u5982\u679c\u662f\uff0c\u5219\u8fd4\u56denull\u3002\u7136\u540e\uff0c\u5b83\u79fb\u52a8\u5230\u5de6\u4fa7\u5b50\u6811\uff0c\u5e76\u7ee7\u7eed\u6bcf\u4e2a\u8282\u70b9\u7684\u5de6\u4fa7\u5b50\u7ea7\uff0c\u76f4\u5230\u5230\u8fbe\u6700\u5de6\u4fa7\u7684\u5b50\u7ea7\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">\"use strict\";\nconst BinarySearchTree = require('.\/BinarySearchTree.js');\nconst Node = require('.\/Node.js');\n\nfunction findMin(rootNode)\n{\nif(rootNode == null)\nreturn null;\nelse if(rootNode.leftChild == null)\nreturn rootNode.val\nelse\nreturn findMin(rootNode.leftChild)\n}  \nvar BST = new BinarySearchTree(6)\nBST.insertBST(20)\nBST.insertBST(-1)\n\nconsole.log(findMin(BST.root))\n<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">-1<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8981\u67e5\u770b\u6b64\u89e3\u51b3\u65b9\u6848\u7684\u5176\u4f59\u4ee3\u7801\uff0c\u8bf7\u8f6c\u5230Educative.io\u5728\u5d4c\u5165\u5f0f\u73af\u5883\u4e2d\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">6\u3001\u56fe\uff1a\u79fb\u9664\u8fb9\u7f18<\/h3>\n<p style=\"margin: 1em 0px;\">\u95ee\u9898\u9648\u8ff0\uff1a\u5b9e\u73b0removeEdge\u51fd\u6570\u4ee5\u5c06\u6e90\u548c\u76ee\u6807\u4f5c\u4e3a\u53c2\u6570\u3002\u5b83\u5e94\u8be5\u68c0\u6d4b\u5b83\u4eec\u4e4b\u95f4\u662f\u5426\u5b58\u5728\u8fb9\u7f18\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u5165\uff1a\u56fe\u5f62\uff0c\u6e90\u548c\u76ee\u6807<\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a\u53bb\u9664\u4e86\u6e90\u548c\u76ee\u6807\u4e4b\u95f4\u7684\u8fb9\u7f18\u7684\u56fe\u5f62\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">removeEdge(graph, 2, 3)<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8fd9\u4e2a\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u975e\u5e38\u7b80\u5355\uff1a\u6211\u4eec\u4f7f\u7528\u7d22\u5f15\u548c\u5220\u9664\u3002\u770b\u4e00\u770b.<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">\"use strict\";\nconst LinkedList = require('.\/LinkedList.js');\nconst Node = require('.\/Node.js');\nconst Graph = require('.\/Graph.js');\nfunction removeEdge(graph, source, dest)\n{\nif(graph.list.length == 0)\n{\nreturn graph;  \n}\nif(source &gt;= graph.list.length || source &lt; 0){\nreturn graph;  }\nif(dest &gt;= graph.list.length || dest &lt; 0){\nreturn graph;  \n}  \ngraph.list[source][\/source].deleteVal(dest);\nreturn graph;}let g = new Graph(5);\ng.addEdge(0, 1);\ng.addEdge(0, 2);g.addEdge(1, 3);\ng.addEdge(2, 4);\ng.addEdge(4, 0);\nconsole.log(\"Before removing edge\")g.printGraph();\nremoveEdge(g, 1, 3);\nconsole.log(\"\\nAfter removing edge\")g.printGraph();\n<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u8981\u67e5\u770b\u6b64\u89e3\u51b3\u65b9\u6848\u7684\u5176\u4f59\u4ee3\u7801\uff0c\u8bf7\u8f6c\u5230Educative.io\u5728\u5d4c\u5165\u5f0f\u73af\u5883\u4e2d\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u7531\u4e8e\u6211\u4eec\u7684\u9876\u70b9\u5b58\u50a8\u5728\u6570\u7ec4\u4e2d\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u8bbf\u95ee\u6e90\u94fe\u63a5\u5217\u8868\u3002\u7136\u540e\uff0c\u6211\u4eec\u4e3a\u94fe\u63a5\u5217\u8868\u8c03\u7528delete\u51fd\u6570\u3002\u8be5\u89e3\u51b3\u65b9\u6848\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u4e3aO\uff08E\uff09\uff0c\u56e0\u4e3a\u6211\u4eec\u53ef\u80fd\u5fc5\u987b\u904d\u5386E\u8fb9\u3002<\/p>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">7\u3001\u54c8\u5e0c\u8868\uff1a\u5c06\u6700\u5927\u5806\u8f6c\u6362\u4e3a\u6700\u5c0f\u5806<\/h3>\n<p style=\"margin: 1em 0px;\">\u95ee\u9898\u9648\u8ff0\uff1a\u5b9e\u73b0\u51fd\u6570convertMax\uff08maxHeap\uff09\u5c06\u4e8c\u8fdb\u5236\u6700\u5927\u5806\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u6700\u5c0f\u5806\u3002maxHeap\u5e94\u8be5\u662fmaxHeap\u683c\u5f0f\u7684\u6570\u7ec4\uff0c\u5373\u7236\u7ea7\u5927\u4e8e\u5b50\u7ea7\u3002 \u8f93\u5165\uff1a\u6700\u5927\u5806<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">maxHeap = [9,4,7,1,-2,6,5]<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u8f93\u51fa\uff1a\u8fd4\u56de\u8f6c\u6362\u540e\u7684\u6570\u7ec4<\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">result = [-2,1,5,9,4,6,7]<\/code><\/p>\n<p style=\"margin: 1em 0px;\">\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u5fc5\u987b\u6700\u5c0f\u5316\u6240\u6709\u7236\u8282\u70b9\u3002\u770b\u4e00\u770b\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6211\u4eec\u5c06maxHeap\u89c6\u4e3a\u5e38\u89c4\u6570\u7ec4\uff0c\u7136\u540e\u5bf9\u5176\u91cd\u65b0\u6392\u5e8f\u4ee5\u51c6\u786e\u8868\u793a\u6700\u5c0f\u5806\u3002\u60a8\u53ef\u4ee5\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\u770b\u5230\u5b8c\u6210\u6b64\u64cd\u4f5c\u3002\u7136\u540e\uff0cconvertMax\uff08\uff09\u51fd\u6570\u901a\u8fc7\u8c03\u7528minHeapify\uff08\uff09\u51fd\u6570\u4ece\u6700\u4f4e\u7236\u8282\u70b9\u8fd8\u539f\u6240\u6709\u8282\u70b9\u4e0a\u7684\u5806\u5c5e\u6027\u3002\u5173\u4e8e\u65f6\u95f4\u590d\u6742\u5ea6\uff0c\u6b64\u89e3\u51b3\u65b9\u6848\u82b1\u8d39O\uff08nlog\uff08n\uff09\uff09O\uff08nlog\uff08n\uff09\uff09\u65f6\u95f4\u3002<\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u56db\u3001\u8d44\u6e90<\/h2>\n<p style=\"margin: 1em 0px;\">\u5f53\u6d89\u53ca\u5230JavaScript\u4e2d\u7684\u6570\u636e\u7ed3\u6784\u65f6\uff0c\u663e\u7136\u6709\u5f88\u591a\u4e1c\u897f\u8981\u5b66\u4e60\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u6574\u7406\u4e86\u6b64\u8d44\u6e90\u5217\u8868\uff0c\u4ee5\u4f7f\u60a8\u5feb\u901f\u4e86\u89e3\u6240\u9700\u7684\u4fe1\u606f\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u6587\u7ae0<\/strong><\/p>\n<p style=\"margin: 1em 0px;\">1\u3001JavaScript ES6\u6559\u7a0b\uff1a\u5237\u65b0\u60a8\u7684JavaScript\u6280\u80fd\uff0c\u5e76\u4fdd\u6301\u81eaES6\u53ca\u66f4\u9ad8\u7248\u672c\u4ee5\u6765\u7684\u6240\u6709\u65b0\u77e5\u8bc6\u66f4\u65b0\u3002\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/blog\/javascript-es6-tutorial-a-complete-crash-course\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/blog\/javascript-es6-tutorial-a-complete-crash-course<\/a>\uff09<\/p>\n<p style=\"margin: 1em 0px;\">2\u30015\u79cd\u4e3a\u7f16\u7801\u9762\u8bd5\u505a\u51c6\u5907\u7684\u53ef\u9760\u6280\u672f\uff1a\u5411\u7f16\u7801\u9762\u8bd5\u505a\u51c6\u5907\u548c\u8868\u6f14\u65f6\uff0c\u5411\u4e13\u5bb6\u5b66\u4e60\u6280\u5de7\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/blog\/5-tried-and-true-techniques-to-prepare-for-a-coding-interview\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/blog\/5-tried-and-true-techniques-to-prepare-for-a-coding-interview<\/a>\uff09<\/p>\n<p style=\"margin: 1em 0px;\">3\u3001StackOverflow JavaScript\u6570\u636e\u7ed3\u6784\u5e93\uff1a\u67e5\u627e\u6709\u7528\u7684\u5e93\uff08\u4f8b\u5982JSClass\uff0cBuckets\u7b49\uff09\u7684\u7edd\u4f73\u8d44\u6e90\u3002\uff08\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/stackoverflow.com\/questions\/5909452\/javascript-data-structures-library\" target=\"_blank\" rel=\"noopener\">https:\/\/stackoverflow.com\/questions\/5909452\/javascript-data-structures-library<\/a>\uff09<\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u8bfe\u7a0b<\/strong><\/p>\n<p style=\"margin: 1em 0px;\">1\u3001JavaScript\u4e2d\u7684\u6570\u636e\u7ed3\u6784\uff1a\u9762\u8bd5\u590d\u4e60\uff1a\u9762\u5411\u6240\u6709\u5e0c\u671b\u5728JavaScript\u4e2d\u5904\u7406\u6570\u636e\u7ed3\u6784\u7684\u4eba\u7684\u6743\u5a01\u6307\u5357\u3002\u9664\u4e86\u8be6\u7ec6\u5ba1\u67e5\u6240\u6709\u6570\u636e\u7ed3\u6784\u53ca\u5176\u5b9e\u73b0\u4e4b\u5916\uff0c\u5b83\u8fd8\u5305\u542b160\u591a\u4e2a\u4ee3\u7801\u6e38\u4e50\u573a\u548c60\u4e2a\u52a8\u624b\u6311\u6218\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/courses\/data-structures-in-javascript-an-interview-refresher\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/courses\/data-structures-in-javascript-an-interview-refresher<\/a><\/p>\n<p style=\"margin: 1em 0px;\">2\u3001JavaScript\u4e2d\u7684\u6570\u636e\u7ed3\u6784-\u53ef\u89c6\u5316\u548c\u7ec3\u4e60\uff1a\u662f\u5426\u9700\u8981\u66f4\u591a\u52a8\u624b\u5b9e\u8df5\uff1f\u672c\u8bfe\u7a0b\u4ee5\u7b80\u5355\u7684\u89c6\u89c9\u548c\u6d4b\u9a8c\u5207\u5165\u4e86\u6570\u636e\u7ed3\u6784\u95ee\u9898\u7684\u6838\u5fc3\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/courses\/data-structures-in-javascript-with-visualizations-and-hands-on-exercises\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/courses\/data-structures-in-javascript-with-visualizations-and-hands-on-exercises<\/a><\/p>\n<p style=\"margin: 1em 0px;\">3\u3001\u638c\u63e1JavaScript\u9762\u8bd5\uff1a\u4e00\u65e6\u638c\u63e1\u4e86\u6570\u636e\u7ed3\u6784\u6280\u80fd\uff0c\u5c31\u8be5\u5237\u65b0\u6709\u5173JS\u9762\u8bd5\u7684\u6240\u6709\u77e5\u8bc6\u3002\u672c\u8bfe\u7a0b\u5305\u542b\u4e86\u6240\u6709\u5185\u5bb9\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/www.educative.io\/courses\/master-the-javascript-interview\" target=\"_blank\" rel=\"noopener\">https:\/\/www.educative.io\/courses\/master-the-javascript-interview<\/a><\/p>\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u56fe\u4e66<\/strong><\/p>\n<p style=\"margin: 1em 0px;\">1\u3001\u5b66\u4e60JS\u6570\u636e\u7ed3\u6784\u548c\u7b97\u6cd5\uff1a\u901a\u8fc7\u89e3\u51b3\u660e\u663e\u7684\u7f16\u7a0b\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u638c\u63e1\u6240\u6709\u6d41\u884c\u7684\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u82f1\u6587\u7248\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/amzn.to\/3dquSVn\" target=\"_blank\" rel=\"noopener\">https:\/\/amzn.to\/3dquSVn<\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u4e2d\u6587\u7248\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/amzn.to\/3bnBdPq\" target=\"_blank\" rel=\"noopener\">https:\/\/amzn.to\/3bnBdPq<\/a><\/p>\n<p style=\"margin: 1em 0px;\">2\u3001\u6709\u5173\u6570\u636e\u7ed3\u6784\u7684\u4e66\u7c4d\u7684\u514d\u8d39\u4ee3\u7801\u51a0\u519b\u5217\u8868\uff1a\u8df3\u8fc7\u641c\u7d22\uff0c\u5e76\u53c2\u8003\u6b64\u6700\u6709\u7528\u7684JS\u6570\u636e\u7ed3\u6784\u548c\u7b97\u6cd5\u63a8\u8350\u4e66\u7c4d\u6e05\u5355\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u56fe\u4e66\u6e05\u5355\u5730\u5740\uff1a<a class=\"url\" href=\"https:\/\/guide.freecodecamp.org\/book-recommendations\/algorithms-in-js-books\" target=\"_blank\" rel=\"noopener\">https:\/\/guide.freecodecamp.org\/book-recommendations\/algorithms-in-js-books<\/a><\/p>\n<blockquote style=\"display: block; font-size: 0.9em; border-left: 3px solid #4870ac; padding: 0.5em 1em; margin: 0px; background: #f6f8fa; color: #40464f;\">\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1a\u5148\u8ba4\u6e05\u6570\u7ec4\/\u961f\u5217\/\u94fe\u8868\/\u6811\/\u56fe\/\u54c8\u5e0c\u8868\u5404\u81ea\u7684\u63d2\u5165\u5220\u9664\u4e0e\u67e5\u627e\u4ee3\u4ef7\uff0c\u518d\u7528\u5bf9\u5e94\u9762\u8bd5\u9898\uff08\u53bb\u5076\u6570\u3001\u62ec\u53f7\u6808\u3001\u4e8c\u8fdb\u5236\u961f\u5217\u3001\u53cd\u8f6c\u94fe\u8868\u3001BST \u6700\u5c0f\u503c\u3001\u53bb\u8fb9\u3001\u5806\u8f6c\u6362\uff09\u628a\u590d\u6742\u5ea6\u7ec3\u5230\u624b\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u7f16\u7801\u6548\u7387\u4e0d\u53ea\u770b\u5199\u4e86\u51e0\u5c0f\u65f6\uff0c\u8fd8\u770b\u8fd0\u884c\u65f6\u95f4\u548c\u5185\u5b58\u3002JavaScript \u91cc\u6709\u4e00\u6279\u73b0\u6210\u7684 \u6570\u636e\u7ed3\u6784\uff0c\u7528\u6765\u7ec4\u7ec7\u6570\u636e\u3001\u5bfc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[105,128],"tags":[150,123,177,140],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2568"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2568"}],"version-history":[{"count":3,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2568\/revisions"}],"predecessor-version":[{"id":3698,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/2568\/revisions\/3698"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}