{"id":200198,"date":"2020-11-15T15:04:05","date_gmt":"2020-11-15T07:04:05","guid":{"rendered":"http:\/\/4563.org\/?p=200198"},"modified":"2020-11-15T15:04:05","modified_gmt":"2020-11-15T07:04:05","slug":"%e5%88%b7-leetcode-%e7%ae%97%e6%b3%95%e9%a2%98%e9%9a%94%e5%a4%a9%e5%bf%98%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=200198","title":{"rendered":"\u5237 Leetcode \u7b97\u6cd5\u9898\u9694\u5929\u5fd8\u600e\u4e48\u529e\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5237 Leetcode \u7b97\u6cd5\u9898\u9694\u5929\u5fd8\u600e\u4e48\u529e\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hakunamatata11 <\/span>  <span><i><\/i> 9<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u7684\u65b9\u6cd5\u8fd8\u633a\u7b80\u5355\u7c97\u66b4\u7684\uff0c\u90a3\u5c31\u662f <strong>\u770b \u5c0f \u6284<\/strong>\u3002<\/p>\n<p>\u522b\u614c\u5144 dei\uff0c\u6211\u8bf4\u7684\u5f53\u7136\u4e0d\u662f\u4f5c\u5f0a\u3002\u6211\u5728\u51c6\u5907\u9762\u8bd5\u524d\u75af\u72c2\u80cc\u4e86\u4e00\u5468\u4ee4\u72d0\u51b2\u5728\u300a\u4e5d\u7ae0\u7b97\u6cd5\u73ed\u300b\u5206\u4eab\u7684\u4e00\u4efd\u7b97\u6cd5\u6a21\u677f\uff0c\u987a\u5229\u5237\u7a7f\u4e86LintCode\u3002\u8fd8\u5728\u9762\u8bd5\u4e2d\u76f4\u63a5\u7528\u4e0a\u7b97\u6cd5\u6a21\u677f\u89e3\u4e86\u9898\uff0c\u5728\u4eca\u5e74 10 \u6708\u4efd\u987a\u5229\u5165\u804c\u5b57\u8282\u8df3\u52a8\uff08\u723d\u7ffb~\uff09\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201124_5fbd116180258.jpg\" alt=\"\u5237 Leetcode \u7b97\u6cd5\u9898\u9694\u5929\u5fd8\u600e\u4e48\u529e\uff1f\" \/><\/p>\n<p>\u4e3e\u4e2a\u6817\u5b50\uff0c\u6765\u770b\u770b\u8fd9\u4efd\u6a21\u677f\u8be5\u600e\u4e48\u7528\u3002<\/p>\n<p>\u5148\u770b\u4f7f\u7528\u6761\u4ef6\uff0c\u5982\u627e\u5230\u4e00\u4e2a\u6700\u5927 \/\u6700\u5c0f\u7684\u503c\u4f7f\u5f97\u67d0\u4e2a\u6761\u4ef6\u88ab\u6ee1\u8db3\uff0c90%\u662f\u7528\u4e8c\u5206\u6cd5\u3002\u786e\u8ba4\u80fd\u7528\u8be5\u6a21\u677f\u89e3\u9898\u65f6\uff0c\u5f97\u51fa\u76f8\u5e94\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u548c\u7a7a\u95f4\u590d\u6742\u5ea6\u3002<\/p>\n<p>\u4ee3\u7801\u64b0\u5199\u4e0d\u89c4\u8303\uff0c\u6216\u662f\u4ee3\u7801\u5757\u4e0d\u591f\u7b80\u6d01\u6e05\u6670\uff0c\u53ef\u4ee5\u80cc\u4e00\u80cc\u4ee4\u72d0\u8001\u5e08\u7cbe\u5fc3\u5236\u4f5c\u7684<strong>\u4ee3\u7801\u6a21\u677f<\/strong>\uff0c\u4e00\u5957\u4e00\u7528\uff0c\u89e3\u9898 so easy \u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201124_5fbd116f2154c.png\" alt=\"\u5237 Leetcode \u7b97\u6cd5\u9898\u9694\u5929\u5fd8\u600e\u4e48\u529e\uff1f\" \/><\/p>\n<p>\u5f53\u7136\uff0c<strong>\u53cc\u6307\u9488\u3001BFS \u3001\u4e8c\u53c9\u6811\u4e0e\u5206\u6cbb\u3001DFS \u3001\u52a8\u6001\u89c4\u5212\u3001\u54c8\u5e0c\u8868\u3001\u5806<\/strong>\u7b49\u77e5\u8bc6\u70b9\u7684\u89e3\u9898\u6a21\u677f\uff0c\u8fd9\u91cc\u4e5f\u7edf\u7edf\u6574\u7406\u597d\u4e86\uff0c\u8fd9\u91cc\u5c31\u662f\u4f60\u7684\u8003\u524d\u300a\u8475\u82b1\u5b9d\u5178\u300b\uff0c\u4e0d\u7528\u518d\u62c5\u5fc3\u9898\u76ee\u5237\u4e86\u5c31\u5fd8\uff0c\u5b83\u5c31\u50cf\u662f\u7269\u7406\u7684\u516c\u5f0f\uff0c\u80cc\u5b8c\u8fd9\u4e9b\u6a21\u677f\u5c31\u8db3\u4ee5\u89e3\u51b3 90%\u4ee5\u4e0a\u7684\u9762\u8bd5\u9898\u3002<\/p>\n<p>\u5f53\u7136\uff0c\u9664\u4e86\u4f1a\u89e3\u9898\uff0c\u548c\u9762\u8bd5\u5b98\u7684\u6c9f\u901a\u4e5f\u5f88\u91cd\u8981\uff0c\u6211\u6574\u7406\u4e86<strong>\u9762\u8bd5\u7684\u56db\u5927\u6c9f\u901a\u6cd5\u5219\uff0c\u5206\u4eab\u7ed9\u5927\u5bb6<\/strong>\uff1a<\/p>\n<p>\u2460\u505a\u4e00\u4e2a\u9898\u4e4b\u524d\uff0c\u5148\u6c9f\u901a\u6e05\u695a\uff0c\u5f97\u5230\u9762\u8bd5\u5b98\u80af\u5b9a\uff0c\u518d\u5f00\u59cb\u5199\u4ee3\u7801\uff0c\u5199\u5b8c\u4ee5\u540e\u518d\u89e3\u91ca<\/p>\n<p>a.\u4e0d\u8981\u95f7\u5934\u5199<\/p>\n<p>b.\u4e5f\u4e0d\u8981\u4e00\u8fb9\u5199\u4e00\u8fb9\u89e3\u91ca\u592a\u591a\uff08\u5bb9\u6613\u5199\u4e0d\u5b8c\uff09<\/p>\n<p>\u2461\u53ef\u4ee5\u8981\u63d0\u793a\uff0c\u7ecf\u8fc7\u63d0\u793a\u505a\u51fa\u6765\u7684\u9898\uff0c\u4e5f\u662f\u53ef\u4ee5\u62ff\u5230 Hire \u7684<\/p>\n<p>\u4f46\u662f\u5148\u81ea\u5df1\u52aa\u529b\u60f3\u4e00\u4e0b\uff0c\u522b\u592a\u5bb9\u6613\u653e\u5f03\uff0c\u5bb9\u6613\u8ba9\u4eba\u89c9\u5f97\u4e0d\u4f1a\u4e3b\u52a8\u601d\u8003\u95ee\u9898<\/p>\n<p>\u2462\u522b\u548c\u9762\u8bd5\u5b98\u5435\u67b6<\/p>\n<p>a.\u9762\u8bd5\u5b98\u5e26\u7740\u7b54\u6848\u6765\u9762\u8bd5\u4f60\u7684<\/p>\n<p>b.\u4e0d\u540c\u610f\u89c1\u5728\u5927\u90e8\u5206\u60c5\u51b5\u4e0b\uff0c\u90fd\u662f\u4f60\u81ea\u5df1\u60f3\u9519\u4e86<\/p>\n<p>\u2463\u4f1a\u5c31\u4f1a\uff0c\u4e0d\u4f1a\u5c31\u4e0d\u4f1a\uff0c\u4e0d\u8981\u906e\u906e\u63a9\u63a9\uff0c\u5766\u8bda\u5f88\u91cd\u8981<\/p>\n<p>a.\u5bb9\u6613\u8ba9\u4eba\u89c9\u5f97\u548c\u4f60\u6c9f\u901a\u201c\u4e0d\u987a\u7545\u201d<\/p>\n<p>b.\u505a\u8fc7\u7684\u9898\u5c31\u8bf4\u505a\u8fc7\uff0c\u4e0d\u8981\u6545\u610f\u8bf4\u6ca1\u505a\u8fc7<\/p>\n<p>c.\u56e0\u4e3a\u4ed6\u65e2\u7136\u5df2\u7ecf\u6000\u7591\u4f60\u505a\u8fc7\u4e86\uff0c\u5373\u4f7f\u4f60\u8bf4\u6ca1\u6709\uff0c\u4ed6\u4e5f\u65e0\u6cd5\u6253\u6d88\u8fd9\u4e2a\u987e\u8651\uff0c\u8fd8\u4e0d\u5982\u8ba9\u4ed6\u6362\u9898<\/p>\n<p>\u4ee5\u4e0a\u8fd9\u4e9b\u5185\u5bb9\uff0c\u524d FLAG \u9ad8\u7ea7\u67b6\u6784\u5e08\u3001\u7b97\u6cd5\u7ade\u8d5b\u56fd\u5bb6\u96c6\u8bad\u961f\u5458\u4ee4\u72d0\u8001\u5e08\u90fd\u5728\u300a\u4e5d\u7ae0\u7b97\u6cd5\u73ed\u300b\u91cc\u6709\u8be6\u7ec6\u8bb2\u89e3\u3002\u9664\u4e86\u9886\u53d6\u7b97\u6cd5\u548c\u6570\u636e\u7ed3\u6784\u7684\u4e07\u7528\u201c\u5c0f\u6284\u201d\uff0c\u4ed6\u8fd8\u4f1a\u5728\u8bfe\u4e0a\u5206\u4eab\uff1a<\/p>\n<ul>\n<li>\u5982\u4f55\u9ad8\u6548\u5237\u9898\uff0c\u8fd9\u91cc\u6709\u7cbe\u9009\u7b97\u6cd5\u9762\u8bd5\u771f\u9898 100 \u9053\u3002\u5237\u5b8c\u9ad8\u9891\u9898\uff0c\u57fa\u672c\u7b97\u6cd5\u77e5\u8bc6\u5c31\u80fd\u8f7b\u677e\u638c\u63e1\u4e86<\/li>\n<li>\u7b97\u6cd5\u9762\u8bd5\u4e2d\u4f18\u79c0\u7684 Coding Quality\uff0c\u8fd8\u6709\u80fd\u590d\u7528\u5728\u9762\u8bd5\u4e2d\u7684\u7b97\u6cd5\u6a21\u677f\uff0c\u9ad8\u6548\u7834\u89e3\u7b97\u6cd5\u9762\u8bd5\u9898<\/li>\n<li>\u4e0e\u9762\u8bd5\u5b98\u5982\u4f55\u6c9f\u901a\uff0c\u5982\u4f55\u62ff\u5230\u9762\u8bd5\u5b98\u7684 strong hire \u3002<\/li>\n<\/ul>\n<blockquote>\n<p>\u73b0\u5728\u7279\u522b\u5f00\u653e\u524d\u56db\u8282\u8bfe\u514d\u8d39\u8bd5\u542c\uff0c\u6233\u6211\u5c31\u53ef\u4ee5\u7528\u4e0a\u7b97\u6cd5\u5c0f\u6284\uff0c\u8fd8\u6709\u7845\u8c37\u8d44\u6df1\u9762\u8bd5\u5b98\u6574\u7406\u7684\u5237\u9898\u7b56\u7565\u548c\u9762\u8bd5\u653b\u7565\uff0c\u611f\u5174\u8da3\u7684\u5c0f\u4f19\u4f34\u4e00\u5b9a\u4e0d\u8981\u9519\u8fc7\u5440~<\/p>\n<\/blockquote>\n<p>\u6652\u5f20 offer\uff0c\u6700\u540e\u5206\u4eab\u4e00\u6ce2\u6211\u6574\u7406\u7684\u5b57\u8282\u8df3\u52a8\u9762\u8bd5\u9ad8\u9891\u9898\uff0c\u4f60\u4e5f\u53ef\u4ee5\u5728 LintCode \u4e0a\u7b5b\u9009\u516c\u53f8\uff0c\u8fdb\u884c\u9636\u68af\u8bad\u7ec3\u5237\u9898\uff0c\u611f\u5174\u8da3\u7684\u5c0f\u4f19\u4f34\u8d76\u7d27\u5237\u8d77\u6765\u5427~<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201124_5fbd117ba8d49.png\" alt=\"\u5237 Leetcode \u7b97\u6cd5\u9898\u9694\u5929\u5fd8\u600e\u4e48\u529e\uff1f\" \/><\/p>\n<p><strong>Easy<\/strong><\/p>\n<p>\u627e\u96f6<\/p>\n<p>\u6700\u957f AB \u5b50\u4e32<\/p>\n<p>\u5355\u8bcd\u95f4\u8ddd<\/p>\n<p>\u6709\u5e8f\u6570\u7ec4\u7684\u5e73\u65b9<\/p>\n<p>\u6805\u680f\u67d3\u8272<\/p>\n<p>\u89e3\u538b\u5b57\u7b26\u4e32<\/p>\n<p>\u514b\u9686\u4e8c\u53c9\u6811<\/p>\n<p>\u6570\u7ec4\u8bc4\u5206<\/p>\n<p><strong>Medium<\/strong><\/p>\n<p>\u6709\u6548\u7684\u62ec\u53f7\u5b57\u7b26\u4e32<\/p>\n<p>\u5220\u9664\u5b57\u7b26<\/p>\n<p>\u5927\u5c9b\u7684\u6570\u91cf<\/p>\n<p>\u7ec4\u5408\u65b0\u6570\u5b57<\/p>\n<p>K \u6570\u548c<\/p>\n<p>\u96c0\u9b42\u542f\u52a8<\/p>\n<p>\u5c71\u8c37\u5e8f\u5217<\/p>\n<p>\u7528 Rand7()\u5b9e\u73b0 Rand10()<\/p>\n<p><strong>Hard<\/strong><\/p>\n<p>\u7b49\u5dee\u5207\u7247 II &#8211; \u5b50\u5e8f\u5217\u5173\u6ce8\u95ee\u9898<\/p>\n<p>\u62c6\u5206\u5b50\u6570\u7ec4<\/p>\n<p>\u6211\u80fd\u8d62\u5417<\/p>\n<p>\u5f00\u9501<\/p>\n<p>\u7956\u739b\u6e38\u620f<\/p>\n<p>\u67e5\u627e\u96c6\u7fa4\u5185\u7684\u300c\u5173\u952e\u8fde\u63a5\u300d<\/p>\n<p>\u8001\u9f20\u8df3\u8dc3<\/p>\n<p>\u6062\u590d\u6570\u7ec4<\/p>\n<p><strong>Super Hard<\/strong><\/p>\n<p>\u6700\u4f18\u8d26\u6237\u7ed3\u4f59<\/p>\n<p>\u4f7f\u4e8c\u53c9\u6811\u5e73\u5747<\/p>\n<p>\u5f02\u6216\u548c<\/p>\n<p>\u5927\u8f6e\u5ed3<\/p>\n<p>\u9a91\u58eb\u7cbe\u795e<\/p>\n<p>\u6bb5\u5f0f\u77f3\u5b50\u5f52\u5e76<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5237 Leetcode \u7b97\u6cd5\u9898\u9694\u5929\u5fd8&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/200198"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=200198"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/200198\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=200198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=200198"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=200198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}