-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcontent.js
3 lines (3 loc) · 64.9 KB
/
content.js
1
2
3
/*! For license information please see content.js.LICENSE.txt */
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/leetcode-cheat/",n(n.s=653)}({105:function(e,t){e.exports={app:{name:"\u529b\u6263\u52a0\u52a0",preview:"\u9884\u89c8",copyMdOrigin:"\u70b9\u51fb\u590d\u5236 MarkDown \u539f\u6587",fullScreen:"\u5168\u5c4f\u6a21\u5f0f(\u9000\u51fa\u8bf7\u6309 ESC)",toUse:"\u53bb\u4f7f\u7528",custom:"\u81ea\u5b9a\u4e49",presets:"\u9884\u8bbe",setLang:"\u8bbe\u7f6e\u8bed\u8a00",changeLang:"English",copy:"\u590d\u5236",save:"\u4fdd\u5b58",yes:"\u662f",no:"\u5426",delete:"\u5220\u9664",delTitle:"\u786e\u8ba4\u8981\u5220\u9664\u4e48\uff1f",deleteSuccess:"\u5220\u9664\u6210\u529f~",saveSuccess:"\u4fdd\u5b58\u6210\u529f~",copySuccess:"\u590d\u5236\u6210\u529f~",article:"\u6587\u7ae0",recommendedQuestions:"\u63a8\u8350\u9898\u76ee\uff1a",goForDictation:"\u53bb\u9ed8\u5199",contribution:"\u7ea0\u9519 or \u8d21\u732e\u5176\u4ed6\u8bed\u8a00",back:"\u8fd4\u56de\u4e3b\u9875",viewSolution:"\u67e5\u770b\u672c\u9898\u9898\u89e3",viewInHandpickCollection:"\u8be5\u9898\u5df2\u88ab\u6536\u5f55\u5230\u7cbe\u9009\u5408\u96c6\u300a{slotText}\u300b\u70b9\u51fb\u67e5\u770b",notCollected:"\u672c\u9898\u6682\u672a\u88ab\u529b\u6263\u52a0\u52a0\u6536\u5f55\uff0c\u70b9\u51fb\u67e5\u770b\u6240\u6709\u5df2\u6536\u5f55\u9898\u76ee~",allCollected:"\u6240\u6709\u5df2\u6536\u5f55\u7684\u9898\u76ee",writingExplanation:"\u6b63\u5728\u64b0\u5199\u9898\u89e3...",goToTheWebsiteToUse:"\u53bb\u7f51\u7ad9\u4f7f\u7528",checkTips:"\u4e00\u822c\u53ea\u8981\u4f60\u5f00\u542f\u4e86\u81ea\u52a8\u66f4\u65b0\uff0c\u90a3\u4e48\u5f53\u63d2\u4ef6\u66f4\u65b0\u4e4b\u540echrome\u4f1a\u5728\u4e94\u4e2a\u5c0f\u65f6\u4ee5\u5185\u81ea\u52a8\u66f4\u65b0\u3002\u5982\u679c\u4f60\u60f3\u7b2c\u4e00\u65f6\u95f4\u66f4\u65b0\uff0c\u6216\u8005\u60a8\u7981\u7528\u4e86\u81ea\u52a8\u66f4\u65b0\uff0c\u90fd\u53ef\u4ee5\u5728\u8fd9\u91cc\u68c0\u6d4b\u6700\u65b0\u7248\u3002",checkBtn:"\u68c0\u6d4b\u66f4\u65b0",selfIntroduction:"\u4f5c\u8005\u662f\u4e00\u4e2a Github 54K star \u7684\u524d\u7aef\u67b6\u6784\u5e08\uff0cleetcode \u5237\u9898\u63d2\u4ef6leetcode-cheatsheet\u4f5c\u8005\uff0c\u638c\u63e1\u5404\u79cd\u7b97\u6cd5\u5957\u8def\uff0c\u5199\u4e86\u5341\u51e0\u4e07\u5b57\u7684\u7b97\u6cd5\u5237\u9898\u5957\u8def\u7535\u5b50\u4e66\uff0c\u516c\u4f17\u53f7\u56de\u590d\u3010\u7535\u5b50\u4e66\u3011\u83b7\u53d6\u3002",allSolutions:{columns:{title:"\u9898\u76ee",tag:"\u6807\u7b7e"}},initializeContentScriptFailed:"\u521d\u59cb\u5316 chrome \u63d2\u4ef6 content script \u5931\u8d25",run:"\u8fd0\u884c",submit:"\u63d0\u4ea4",wirteSolution:"\u5199\u9898\u89e3",visualizationDebug:"\u53ef\u89c6\u5316\u8c03\u8bd5",linkedListCommnet:"\u5982\u679c\u4f60\u5728\u8c03\u8bd5\u94fe\u8868\u9898\u76ee\uff0c\u624b\u52a8\u751f\u6210\u94fe\u8868\u5f88\u9ebb\u70e6\uff0c\u60f3\u5feb\u901f\u751f\u6210\u94fe\u8868\u53ef\u4ee5\u6ce8\u91ca\u5982\u4e0b\u65b9\u6cd5\uff0c\u5e76\u4f7f\u7528\u5982\u4e0b\u65b9\u6cd5\uff0c\u8f93\u5165\u4e00\u4e2a\u6570\u7ec4\uff0c\u8fd4\u56de\u4e00\u4e2a\u94fe\u8868",visualDebugComment:"\u66ff\u6362\u4e0b\u65b9\u7684 xxx \u4e3a\u4e3b\u51fd\u6570\u540d\uff0c yyy \u4e3a\u6d4b\u8bd5\u7528\u4f8b\u53c2\u6570\u5f00\u542f\u8c03\u8bd5",visualDebugSupport:"\u5f53\u524d\u4ec5\u652f\u6301",getProblemError:"\u83b7\u53d6\u9898\u76ee\u63cf\u8ff0\u5931\u8d25\uff0c\u8bf7\u5148\u5207\u6362\u5230\u9898\u76ee\u63cf\u8ff0\u6807\u7b7e\u9875",savingProblem:"\u6b63\u5728\u5b58\u50a8\u9898\u76ee\u4fe1\u606f\uff0c\u8bf7\u7a0d\u540e~",githubAPIError:"\u4f7f\u7528 Github API \u5931\u8d25\uff0c\u5df2\u4e3a\u60a8\u5207\u6362\u4e3a\u666e\u901a\u6a21\u5f0f\uff0c\u666e\u901a\u6a21\u5f0f\u4ec5\u53ef\u81ea\u52a8\u5e26\u5165\u9898\u76ee\u540d\u79f0\uff0c\u9898\u76ee\u5730\u5740\u4ee5\u53ca\u9898\u89e3\u8bed\u8a00\u3002\u5982\u679c\u8fd8\u65e0\u6cd5\u4f7f\u7528\uff0c\u8bf7\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u89e3\u9664\u6253\u5f00\u7f51\u5740\u7684\u7981\u7528\uff0c\u5e76\u91cd\u8bd5",notYet:"\u6682\u65e0"},problem:{3:"3. \u65e0\u91cd\u590d\u5b57\u7b26\u7684\u6700\u957f\u5b50\u4e32",10:"10. \u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d",34:"34. \u5728\u6392\u5e8f\u6570\u7ec4\u4e2d\u67e5\u627e\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u548c\u6700\u540e\u4e00\u4e2a\u4f4d\u7f6e",39:"39. \u7ec4\u5408\u603b\u548c",40:"40. \u7ec4\u5408\u603b\u548c II",44:"44. \u901a\u914d\u7b26\u5339\u914d",46:"46. \u5168\u6392\u5217",47:"47. \u5168\u6392\u5217 II",52:"52. N \u7687\u540e II",62:"62. \u4e0d\u540c\u8def\u5f84",63:"63. \u4e0d\u540c\u8def\u5f84 II",64:"64. \u6700\u5c0f\u8def\u5f84\u548c",69:"69. x \u7684\u5e73\u65b9\u6839",70:"70. \u722c\u697c\u68af",72:"72. \u7f16\u8f91\u8ddd\u79bb",76:"76. \u6700\u5c0f\u8986\u76d6\u5b50\u4e32",78:"78. \u5b50\u96c6",90:"90. \u5b50\u96c6 II",113:"113. \u8def\u5f84\u603b\u548c II",116:"116. \u586b\u5145\u6bcf\u4e2a\u8282\u70b9\u7684\u4e0b\u4e00\u4e2a\u53f3\u4fa7\u8282\u70b9\u6307\u9488",131:"131. \u5206\u5272\u56de\u6587\u4e32",140:"140. \u5355\u8bcd\u62c6\u5206 II",148:"148. \u6392\u5e8f\u94fe\u8868",174:"174. \u5730\u4e0b\u57ce\u6e38\u620f",198:"198. \u6253\u5bb6\u52ab\u820d",208:"208. \u5b9e\u73b0 Trie (\u524d\u7f00\u6811)",209:"209. \u957f\u5ea6\u6700\u5c0f\u7684\u5b50\u6570\u7ec4",211:"211. \u6dfb\u52a0\u4e0e\u641c\u7d22\u5355\u8bcd - \u6570\u636e\u7ed3\u6784\u8bbe\u8ba1",212:"212. \u5355\u8bcd\u641c\u7d22 II",233:"233. \u6570\u5b57 1 \u7684\u4e2a\u6570",278:"278. \u7b2c\u4e00\u4e2a\u9519\u8bef\u7684\u7248\u672c","278_desc":"\u6700\u5de6\u6700\u53f3\u601d\u8def\u4e00\u6837\uff0c\u5927\u5bb6\u7ec3\u4e60\u4e24\u9053\uff0c\u5b9e\u9645\u60c5\u51b5\u6839\u636e\u9898\u610f\u4f7f\u7528\u4e0d\u540c\u7684\u4e8c\u5206\u5373\u53ef\u3002",292:"292. Nim \u6e38\u620f",303:"303. \u533a\u57df\u548c\u68c0\u7d22 - \u6570\u7ec4\u4e0d\u53ef\u53d8\uff08\u4f7f\u7528\u4e00\u7ef4\u524d\u7f00\u548c\u4f1a\u66f4\u7b80\u5355\uff09",307:"307. \u533a\u57df\u548c\u68c0\u7d22 - \u6570\u7ec4\u53ef\u4fee\u6539",3187:"3187. \u6570\u7ec4\u4e2d\u7684\u5cf0\u503c",327:"327. \u533a\u95f4\u548c\u7684\u4e2a\u6570",322:"322. \u96f6\u94b1\u5151\u6362",337:"337. \u6253\u5bb6\u52ab\u820d III",357:"357. \u8ba1\u7b97\u5404\u4e2a\u4f4d\u6570\u4e0d\u540c\u7684\u6570\u5b57\u4e2a\u6570",399:"399. \u9664\u6cd5\u6c42\u503c",416:"416. \u5206\u5272\u7b49\u548c\u5b50\u96c6",438:"438. \u627e\u5230\u5b57\u7b26\u4e32\u4e2d\u6240\u6709\u5b57\u6bcd\u5f02\u4f4d\u8bcd",464:"464. \u6211\u80fd\u8d62\u5417",472:"472. \u8fde\u63a5\u8bcd",493:"493. \u7ffb\u8f6c\u5bf9",513:"513. \u627e\u6811\u5de6\u4e0b\u89d2\u7684\u503c",518:"518. \u96f6\u94b1\u5151\u6362 II",528:"528. \u6309\u6743\u91cd\u968f\u673a\u9009\u62e9",540:"540. \u6709\u5e8f\u6570\u7ec4\u4e2d\u7684\u5355\u4e00\u5143\u7d20",547:"547. \u670b\u53cb\u5708",576:"576. \u51fa\u754c\u7684\u8def\u5f84\u6570(\u53ea\u80fd\u9009\u4e24\u4e2a\u65b9\u5411\u53d8\u6210\u4e86\u53ea\u80fd\u9009\u56db\u4e2a\u65b9\u5411\u800c\u5df2)",648:"648. \u5355\u8bcd\u66ff\u6362",662:"662. \u4e8c\u53c9\u6811\u6700\u5927\u5bbd\u5ea6",698:"698. \u5212\u5206\u4e3a k \u4e2a\u76f8\u7b49\u7684\u5b50\u96c6",721:"721. \u8d26\u6237\u5408\u5e76",743:"743. \u7f51\u7edc\u5ef6\u8fdf\u65f6\u95f4",778:"778. \u6c34\u4f4d\u4e0a\u5347\u7684\u6cf3\u6c60\u4e2d\u6e38\u6cf3","778_desc":"DFS + \u4e8c\u5206\uff0c\u7c7b\u4f3c\u7684\u9898\u76ee\u6709\u5f88\u591a\uff0c\u6bd4\u5982\u7b2c 1439 \u9898\u3002\u8fd9\u79cd\u9898\u5957\u8def\u90fd\u5f88\u50cf\uff0c\u96be\u5ea6\u5176\u5b9e\u4e5f\u4e0d\u7b97\u5927\u3002",808:"808. \u5206\u6c64",816:"816. \u6a21\u7cca\u5750\u6807",820:"820. \u5355\u8bcd\u7684\u538b\u7f29\u7f16\u7801",837:"837. \u65b021\u70b9",863:"863. \u4e8c\u53c9\u6811\u4e2d\u6240\u6709\u8ddd\u79bb\u4e3a K \u7684\u7ed3\u70b9",877:"877. \u77f3\u5b50\u6e38\u620f",902:"902. \u6700\u5927\u4e3a N \u7684\u6570\u5b57\u7ec4\u5408",904:"904. \u6c34\u679c\u6210\u7bee",912:"912. \u6392\u5e8f\u6570\u7ec4",930:"930. \u548c\u76f8\u540c\u7684\u4e8c\u5143\u5b50\u6570\u7ec4",935:"935. \u9a91\u58eb\u62e8\u53f7\u5668(\u53ea\u80fd\u9009\u4e24\u4e2a\u65b9\u5411\u53d8\u6210\u4e86\u53ea\u80fd\u9009\u516b\u4e2a\u65b9\u5411\u800c\u5df2)",990:"990. \u7b49\u5f0f\u65b9\u7a0b\u7684\u53ef\u6ee1\u8db3\u6027",992:"992. K \u4e2a\u4e0d\u540c\u6574\u6570\u7684\u5b50\u6570\u7ec4",1004:"1004. \u6700\u5927\u8fde\u7eed 1 \u7684\u4e2a\u6570 III",1015:"1015. \u53ef\u88ab K \u6574\u9664\u7684\u6700\u5c0f\u6574\u6570",1032:"1032. \u5b57\u7b26\u6d41",1046:"1046. \u6700\u540e\u4e00\u5757\u77f3\u5934\u7684\u91cd\u91cf(\u8fd9\u9053\u9898\u9700\u8981\u7528\u5927\u9876\u5806\uff0c\u4e0d\u8fc7\u90fd\u5dee\u4e0d\u591a)",1202:"1202. \u4ea4\u6362\u5b57\u7b26\u4e32\u4e2d\u7684\u5143\u7d20",1109:"1109. \u822a\u73ed\u9884\u8ba2\u7edf\u8ba1",1140:"1140. \u77f3\u5b50\u6e38\u620f II",1234:"1234. \u66ff\u6362\u5b50\u4e32\u5f97\u5230\u5e73\u8861\u5b57\u7b26\u4e32",1248:"1248. \u7edf\u8ba1\u300c\u4f18\u7f8e\u5b50\u6570\u7ec4\u300d",1255:"1255. \u5f97\u5206\u6700\u9ad8\u7684\u5355\u8bcd\u96c6\u5408",1314:"1314. \u77e9\u9635\u533a\u57df\u548c",1406:"1406. \u77f3\u5b50\u6e38\u620f III",1462:"1462. \u8bfe\u7a0b\u8868 IV",1480:"1480. \u4e00\u7ef4\u6570\u7ec4\u7684\u52a8\u6001\u548c",1510:"1510. \u77f3\u5b50\u6e38\u620f IV",1563:"1563. \u77f3\u5b50\u6e38\u620f V",1584:"1584. \u8fde\u63a5\u6240\u6709\u70b9\u7684\u6700\u5c0f\u8d39\u7528",1649:"1649. \u901a\u8fc7\u6307\u4ee4\u521b\u5efa\u6709\u5e8f\u6570\u7ec4",1681:"1681. \u6700\u5c0f\u4e0d\u517c\u5bb9\u6027",1686:"1686. \u77f3\u5b50\u6e38\u620f VI","1686_desc":"\u9664\u4e86\u8fd9\u4e2a\uff0c\u5176\u4ed6\u300a\u77f3\u5b50\u6e38\u620f\u300b\u601d\u8def\u57fa\u672c\u90fd\u4e00\u6837",1690:"1690. \u77f3\u5b50\u6e38\u620f VII",1886:"1886. \u5224\u65ad\u77e9\u9635\u7ecf\u8f6e\u8f6c\u540e\u662f\u5426\u4e00\u81f4",2536:"2536. \u5b50\u77e9\u9635\u5143\u7d20\u52a0 1",2569:"2569. \u66f4\u65b0\u6570\u7ec4\u540e\u5904\u7406\u6c42\u548c\u67e5\u8be2",2736:"2736. \u6700\u5927\u548c\u67e5\u8be2",2867:"2867. \u7edf\u8ba1\u6811\u4e2d\u7684\u5408\u6cd5\u8def\u5f84\u6570\u76ee",minimumLightRadius:"\u6700\u5c0f\u5149\u7167\u534a\u5f84",minimumLightRadius_desc:"\u7ecf\u5178\u80fd\u529b\u68c0\u6d4b\u4e8c\u5206\uff0c\u529b\u6263\u4e5f\u6709\u4e00\u9053\u7c7b\u4f3c\u9898",kthPairDistance:"\u7b2c K \u5c0f\u7684\u8ddd\u79bb\u5bf9",kthPairDistance_desc:"\u5178\u578b\u7684\u8ba1\u6570\u4e8c\u5206\uff0c\u672c\u8d28\u4e0a\u4e5f\u662f\u80fd\u529b\u68c0\u6d4b\uff0c\u53ea\u4e0d\u8fc7\u9898\u91cf\u5927\uff0c\u5355\u72ec\u62c6\u51fa\u6765\u3002",increasingDigits:"\u9012\u589e\u7684\u6570\u4f4d",palindromicInsertions:"\u56de\u6587\u63d2\u5165",palindromicInsertions_desc:"\u533a\u95f4 dp \u9700\u8981\u4ece\u5e8f\u5217\u4e24\u5934\u540c\u65f6\u8fdb\u884c\uff0c\u800c\u4e0d\u662f\u4ece\u5e8f\u5217\u7684\u67d0\u4e00\u7aef\u5230\u53e6\u4e00\u7aef",JZ51:"\u5251\u6307 Offer 51. \u6570\u7ec4\u4e2d\u7684\u9006\u5e8f\u5bf9",interview17_13:"\u9762\u8bd5\u9898 17.13. \u6062\u590d\u7a7a\u683c",interview17_13__desc:"\u7ec6\u8282\u600e\u4e48\u7ec3\uff1f+1\uff1f -1? \u600e\u4e48\u521d\u59cb\u5316\uff1f\u5927\u5bb6\u53ef\u4ee5\u901a\u8fc7\u8fd9\u9053\u9898\u5b66\u4e60\u4e00\u4e0b~",longestIncreasingSubsequence:"\u6700\u957f\u4e0a\u5347\u5b50\u5e8f\u5217\u7cfb\u5217",longestIncreasingSubsequence_desc:"\u7cfb\u5217\u7ecf\u5178\u9898\u76ee\uff0c\u503c\u5f97\u4e00\u505a",littleRabbitsChessboard:"\u5c0f\u5154\u7684\u68cb\u76d8",shopeesOffice:"Shopee \u7684\u529e\u516c\u5ba4"},codeTemplate:{name:"\u4ee3\u7801\u6a21\u677f",perSum:{title:"\u524d\u7f00\u548c",tips:"\u5efa\u8bae\u5148\u5b66\u4f1a\u4e4b\u540e\u518d\u7528\u6a21\u677f\u3002 \u5982\u679c\u4f60\u8fd8\u4e0d\u4f1a\u7684\u8bdd\uff0c\u53ef\u4ee5\u770b\u770b\u8fd9\u7bc7",item1:"\u4e00\u7ef4\u524d\u7f00\u548c",item2:"\u4e8c\u7ef4\u524d\u7f00\u548c",item3:"\u4e00\u7ef4\u5dee\u5206\u6570\u7ec4",item4:"\u4e8c\u7ef4\u5dee\u5206\u6570\u7ec4"},graph:{title:"\u56fe",item1:"dijkstra(\u5355\u6e90\u8d2a\u5fc3\u6700\u77ed\u8def\u5f84)",item1_desc1:"\u6bd4\u5982\u4e00\u4e2a\u56fe\u662f\u8fd9\u6837\u7684\uff1a",item1_desc2:"\u6211\u4eec\u4f7f\u7528\u90bb\u63a5\u77e9\u9635\u6765\u6784\u9020\uff1a",item2:"floyd_warshall(\u591a\u6e90\u52a8\u6001\u89c4\u5212\u6700\u77ed\u8def\u5f84)",item3:"Bellman\u2013Ford\uff08\u5355\u6e90\u52a8\u6001\u89c4\u5212\u6700\u77ed\u8def\u5f84\uff09",item4:"Kruskal\uff08\u53c8\u79f0\u52a0\u8fb9\u6cd5\uff0c\u662f\u4e00\u79cd\u6700\u5c0f\u751f\u6210\u6811\u7b97\u6cd5\uff09",item5:"Prim\uff08\u53c8\u79f0\u52a0\u70b9\u6cd5\uff0c\u662f\u4e00\u79cd\u6700\u5c0f\u751f\u6210\u6811\u7b97\u6cd5\uff09",item6:"Kahn\uff08\u57fa\u4e8eBFS\u7684\u62d3\u6251\u6392\u5e8f\uff09"},binarySearch:{title:"\u4e8c\u5206\u6cd5",item1:"\u67e5\u627e\u4e00\u4e2a\u6570",item2:"\u5bfb\u627e\u6700\u5de6\u8fb9\u7684\u6ee1\u8db3\u6761\u4ef6\u7684\u503c",item3:"\u5bfb\u627e\u6700\u53f3\u8fb9\u7684\u6ee1\u8db3\u6761\u4ef6\u7684\u503c",item4:"\u5bfb\u627e\u6700\u5de6\u63d2\u5165\u4f4d\u7f6e",item5:"\u5bfb\u627e\u6700\u53f3\u63d2\u5165\u4f4d\u7f6e"},BFS:{item1:"\u5e26\u5c42\u4fe1\u606f",item2:"\u4e0d\u5e26\u5c42\u4fe1\u606f"},heap:{title:"\u5806",item1:"\u5c0f\u9876\u5806",item2:"\u5bf9\u9876\u5806"},slidingWindow:{title:"\u6ed1\u52a8\u7a97\u53e3",item1:"\u56fa\u5b9a\u7a97\u53e3\uff08\u4f2a\u4ee3\u7801\uff09",item1_text:"\n \u521d\u59cb\u5316\u524d\u540e\u6307\u9488 = 0\n \u521d\u59cb\u5316 ans\n\n for \u524d\u6307\u9488 in \u53ef\u8fed\u4ee3\u96c6\u5408\n \u66f4\u65b0\u7a97\u53e3\u5185\u4fe1\u606f\uff08\u524d\u6307\u9488\u8fdb\u7a97\u53e3\uff0c\u540e\u6307\u9488\u51fa\u7a97\u53e3\uff09\n \u540e\u6307\u9488\u79fb\u52a8\n \u66f4\u65b0\u7b54\u6848\n \u8fd4\u56de ans\n ",item2:"\u53ef\u53d8\u7a97\u53e3\uff08\u4f2a\u4ee3\u7801\uff09",item2_text:"\n \u521d\u59cb\u5316\u6162\u6307\u9488 = 0\n \u521d\u59cb\u5316 ans\n\n for \u5feb\u6307\u9488 in \u53ef\u8fed\u4ee3\u96c6\u5408\n \u66f4\u65b0\u7a97\u53e3\u5185\u4fe1\u606f\n while \u7a97\u53e3\u5185\u4e0d\u7b26\u5408\u9898\u610f\n \u6269\u5c55\u6216\u8005\u6536\u7f29\u7a97\u53e3\n \u6162\u6307\u9488\u79fb\u52a8\n \u66f4\u65b0\u7b54\u6848\n \u8fd4\u56de ans\n "},backtrack:{title:"\u56de\u6eaf",item1:"\u6807\u51c6\u56de\u6eaf\uff08\u4f2a\u4ee3\u7801\uff09",item2:"\u7b1b\u5361\u5c14\u79ef\u4f18\u5316"},trie:{title:"\u524d\u7f00\u6811",item1:"\u6807\u51c6\u524d\u7f00\u6811"},uf:{title:"\u5e76\u67e5\u96c6",item1:"\u4e0d\u5e26\u6743\u5e76\u67e5\u96c6",item2:"\u5e26\u6743\u5e76\u67e5\u96c6"},segmentTree:{title:"\u7ebf\u6bb5\u6811\u548c\u6811\u72b6\u6570\u7ec4",item1:"\u533a\u95f4\u548c\u7ebf\u6bb5\u6811",item2:"\u533a\u95f4\u548c\u61d2\u66f4\u65b0\uff08\u533a\u95f4\u66f4\u65b0\uff09\u7ebf\u6bb5\u6811",item3:"\u8ba1\u6570\u7ebf\u6bb5\u6811",item4:"\u52a8\u6001\u5f00\u70b9",item5:"\u6811\u72b6\u6570\u7ec4"},handWriting:{title:"\u624b\u6495\u7b97\u6cd5",item1:"\u6570\u7ec4\u6392\u5e8f",item2:"\u94fe\u8868\u6392\u5e8f"},rotate:{title:"\u77e9\u9635\u65cb\u8f6c",item1:"\u987a\u65f6\u9488 90\xb0 \u65cb\u8f6c\u4e8c\u7ef4\u77e9\u9635"},prime:{title:"\u6c42\u8d28\u6570",item1:"\u8d28\u6570\u7b5b\u9009\u6cd5"},suffixArray:{title:"\u540e\u7f00\u6570\u7ec4",item1:"\u6807\u51c6\u7248"},moreTemplate:"\u66f4\u591a\u6a21\u677f\u540e\u7eed\u9646\u7eed\u66f4\u65b0~"},dataStructureVisualization:{name:"\u6570\u636e\u7ed3\u6784\u53ef\u89c6\u5316",incrementalUsage:"\u589e\u91cf\u4f7f\u7528",explain1:"\u6682\u4e0d\u652f\u6301\u7f16\u8f91\u529f\u80fd\u3002\u5982\u679c\u9700\u8981\u7f16\u8f91\uff0c\u53ef\u901a\u8fc7\u5148\u201c\u4f7f\u7528\u201d\u518d\u201c\u4fdd\u5b58\u201d\uff0c\u6700\u540e\u201c\u5220\u9664\u201d\u539f\u6709\u7684\u6570\u636e\uff0c\u4ece\u800c\u95f4\u63a5\u5b9e\u73b0\u3002",explain2:"\u6a21\u677f\u53ef\u4ee5\u589e\u91cf\u4f7f\u7528\u3002\u70b9\u51fb\u201d\u53bb\u4f7f\u7528\u201c\u7684\u4e0b\u62c9\u4e09\u89d2\uff0c\u5e76\u9009\u62e9\u589e\u91cf\u4f7f\u7528\u5373\u53ef\u3002",explain3:"\u4f7f\u7528\u7684\u6a21\u677f\u4f1a\u6839\u636e\u4f60\u9f20\u6807\u7684\u4f4d\u7f6e\u751f\u6210\u3002\u6bd4\u5982\u4f60\u7684\u9f20\u6807\u5728\u70b9(100, 100)\uff0c\u90a3\u4e48\u6a21\u677f\u4f1a\u6574\u4f53\u504f\u79fb (100, 100)\u4e2a\u5355\u4f4d\u3002\u5982\u679c\u6b64\u65f6\u6a21\u677f\u5e76\u4e0d\u662f\u6b63\u597d\u4ee5(100, 100)\u4e3a\u5de6\u4e0a\u9876\u70b9\uff0c\u8bf4\u660e\u6a21\u677f\u672c\u8eab\u5236\u4f5c\u7684\u65f6\u5019\u5c31\u4e0d\u662f\u4ee5(0,0)\u4e3a\u5de6\u4e0a\u9876\u70b9\u5236\u4f5c\u7684\u3002\u5927\u5bb6\u5236\u4f5c\u81ea\u5b9a\u4e49\u6a21\u677f\u7684\u8bdd\u9700\u8981\u6ce8\u610f\u8fd9\u4e00\u70b9\u3002",explain4:"\u4f60\u4e5f\u53ef\u4ee5\u9009\u62e9\u76f4\u63a5\u4f7f\u7528\u539f\u751f excalidraw "},explanationTemplate:{name:"\u9898\u89e3\u6a21\u677f",code:"\u4ee3\u7801",goToTheWebsiteToUse:"\u53bb\u7f51\u7ad9\u4f7f\u7528",problemAddress:"\u9898\u76ee\u5730\u5740",problemDesc:"\u9898\u76ee\u63cf\u8ff0",preKnowledge:"\u524d\u7f6e\u77e5\u8bc6",company:"\u516c\u53f8",thinking:"\u601d\u8def",keyPoints:"\u5173\u952e\u70b9",languageSupport:"\u8bed\u8a00\u652f\u6301",complexityAnalysis:"\u590d\u6742\u5ea6\u5206\u6790",complexityDeclare:"\u4ee4 n \u4e3a\u6570\u7ec4\u957f\u5ea6\u3002",timeComplexity:"\u65f6\u95f4\u590d\u6742\u5ea6",spaceComplexity:"\u7a7a\u95f4\u590d\u6742\u5ea6",howToUse:"\u5982\u4f55\u4f7f\u7528\uff1f",programmingLanguage:"\u7f16\u7a0b\u8bed\u8a00:1",commonFormulas:"\u5e38\u7528\u516c\u5f0f\uff08\u70b9\u51fb\u53ef\u590d\u5236\uff09\uff1a",noBackup:"\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u5907\u4efd\u6587\u4ef6",restore:"\u6062\u590d\u4e0a\u6b21\u7f16\u8f91\u5185\u5bb9",backupTips:"\u9898\u89e3\u6bcf\u4e94\u79d2\u5907\u4efd\u4e00\u6b21\uff0c\u5982\u679c\u4f60\u4e0d\u5c0f\u5fc3\u5237\u65b0\u4e86\u6d4f\u89c8\u5668\u53ef\u4ee5\u70b9\u51fb\u4e0b\u65b9\u7684\u6062\u590d\u6309\u94ae\u8fd8\u539f\u3002\u7531\u4e8e\u662f\u8986\u76d6\u5f0f\u5907\u4efd\uff0c\u56e0\u6b64\u4ec5\u4f1a\u4fdd\u5b58\u6700\u540e\u4e00\u6b21\u7f16\u8f91\u7684\u5185\u5bb9\u3002",afterUpdateTemplateTips:"\u540e\u7eed\u8003\u8651\u63d0\u4f9b\u66f4\u591a\u9898\u89e3\u6a21\u677f\u3002",afterUpdateThemeTips:"\u540e\u7eed\u8003\u8651\u652f\u6301\u66f4\u591a\u4e3b\u9898\uff0c\u4ee5\u53ca\u7528\u6237\u81ea\u5b9a\u4e49\u4e3b\u9898\u3002"},complexityQuickCheck:{name:"\u590d\u6742\u5ea6\u901f\u67e5",tips:"\u4e0d\u61c2\u4e3a\u4ec0\u4e48\uff1f\u70b9\u8fd9\u91cc",dataScale:"\u6570\u636e\u89c4\u6a21",timeComplexity:"\u7b97\u6cd5\u53ef\u63a5\u53d7\u65f6\u95f4\u590d\u6742\u5ea6"},learningRoute:{name:"\u5b66\u4e60\u8def\u7ebf",binarySearch:"\u4e8c\u5206\u67e5\u627e",binarySearchDesc:"\n \u5982\u679c\u8ba9\u6211\u7528\u4e00\u53e5\u8bdd\u603b\u7ed3\u4e8c\u5206\u6cd5\uff0c\u6211\u4f1a\u8bf4**\u4e8c\u5206\u6cd5\u662f\u4e00\u79cd\u8ba9\u672a\u77e5\u4e16\u754c\u65e0\u673a\u53ef\u4e58\u7684\u7b97\u6cd5**\u3002\u5373\u4e8c\u5206\u6cd5\u65e0\u8bba\u5982\u4f55\u6211\u4eec\u90fd\u53ef\u4ee5\u820d\u5f03\u4e00\u534a\u89e3\uff0c\u4e5f\u5c31\u662f\u65e0\u8bba\u5982\u4f55\u90fd\u53ef\u4ee5\u5c06\u89e3\u7a7a\u95f4\u780d\u534a\u3002\n \u96be\u70b9\u5c31\u662f\u4e24\u70b9\uff1a**\u4ec0\u4e48\u6761\u4ef6** \u548c **\u820d\u5f03\u54ea\u90e8\u5206**\u3002\u8fd9\u662f\u4e8c\u5206\u6cd5\u6838\u5fc3\u8981\u89e3\u51b3\u7684\u95ee\u9898\u3002\n \n \u4ece\u6218\u672f\u4e0a\u6709\u4e24\u79cd\u57fa\u672c\u7c7b\u578b\uff0c\u5206\u522b\u662f\u6700\u5de6\u63d2\u5165\u4e8c\u5206\u548c\u6700\u53f3\u63d2\u5165\u4e8c\u5206\u3002\n \n \u4ece\u6218\u7565\u4e0a\u6709\u56db\u79cd\u57fa\u672c\u7c7b\u578b\uff0c\u80fd\u529b\u68c0\u6d4b\u4e8c\u5206\uff0c\u524d\u7f00\u548c\u4e8c\u5206\uff0c\u63d2\u5165\u6392\u5e8f\u4e8c\u5206\u548c\u8ba1\u6570\u4e8c\u5206\u3002\n \n \u4e24\u79cd\u7c7b\u578b\uff08\u6700\u5de6\u548c\u6700\u53f3\u63d2\u5165\uff09\u4e3b\u8981\u89e3\u51b3\u7684\u7684\u662f\uff1a**\u89e3\u7a7a\u95f4\u5df2\u7ecf\u660e\u786e\u51fa\u6765\u4e86\uff0c\u5982\u4f55\u7528\u4ee3\u7801\u627e\u51fa\u5177\u4f53\u7684\u89e3**\u3002\u800c\u56db\u5927\u5e94\u7528\u4e3b\u8981\u89e3\u51b3\u7684\u662f\uff1a**\u5982\u4f55\u6784\u9020\u89e3\u7a7a\u95f4**\u3002\u66f4\u591a\u7684\u60c5\u51b5\u5219\u662f\u5982\u4f55\u6784\u5efa\u6709\u5e8f\u5e8f\u5217\u3002\n\n \u8fd9\u4e24\u90e8\u5206\u90fd\u662f\u5b9e\u64cd\u6027\u5f88\u5f3a\u7684\u5185\u5bb9\uff0c\u5728\u7406\u89e3\u8fd9\u4e24\u90e8\u5206\u5185\u5bb9\u7684\u540c\u65f6\uff0c\u8bf7\u5927\u5bb6\u52a1\u5fc5\u7262\u8bb0\u4e00\u4e2a\u4e2d\u5fc3**\u6298\u534a**\u3002\n \n \u66f4\u591a\u5185\u5bb9\u8bf7\u8bbf\u95ee\uff1ahttps://lucifer.ren/blog/2021/03/08/binary-search-1",binarySearch_item1:"\u6700\u5de6/\u6700\u53f3\u4e8c\u5206",binarySearch_item1_text:"\u4ee3\u7801\u53c2\u8003\uff1a\u4ee3\u7801\u6a21\u677f - \u4e8c\u5206\u6cd5",binarySearch_item1_keys:"\n 1. \u6700\u5de6\u4e8c\u5206\u4e0d\u65ad\u6536\u7f29\u53f3\u8fb9\u754c\uff0c\u6700\u7ec8\u8fd4\u56de\u5de6\u8fb9\u754c\n 2. \u6700\u53f3\u4e8c\u5206\u4e0d\u65ad\u6536\u7f29\u5de6\u8fb9\u754c\uff0c\u6700\u7ec8\u8fd4\u56de\u53f3\u8fb9\u754c\n ",binarySearch_item2:"\u80fd\u529b\u68c0\u6d4b\u4e8c\u5206",binarySearch_item2_keys:'\u5b9a\u4e49\u51fd\u6570 possible \u53c2\u6570\u662f mid\uff0c\u8fd4\u56de\u503c\u662f\u5e03\u5c14\u503c\u3002\u5916\u5c42\u6839\u636e\u8fd4\u56de\u503c\u8c03\u6574"\u89e3\u7a7a\u95f4"\u3002\u793a\u4f8b\u4ee3\u7801\u662f\u4ee5\u6700\u5de6\u4e8c\u5206\u4e3a\u4f8b\u7684\u3002\n ',binarySearch_item3:"\u524d\u7f00\u548c\u4e8c\u5206",binarySearch_item3_keys:"\n \u5982\u679c\u6570\u7ec4\u662f\u975e\u8d1f\u7684\uff0c\u90a3\u4e48\u524d\u7f00\u548c\u5c31\u662f\u4e00\u4e2a\u5355\u8c03\u4e0d\u9012\u51cf\u6570\u7ec4\uff0c\u6211\u4eec\u6709\u65f6\u5019\u53ef\u4ee5\u57fa\u4e8e\u5b83\u6765\u505a\u4e8c\u5206\u3002\n ",binarySearch_item4:"\u63d2\u5165\u6392\u5e8f\u4e8c\u5206",binarySearch_item4_keys:"\n \u4e0d\u65ad\u63d2\u5165\u5e76\u7ef4\u62a4\u5e8f\u5217\u6709\u5e8f\uff0c\u8fdb\u800c\u5229\u7528\u6709\u5e8f\u505a\u4e00\u4e9b\u4e8b\u60c5\u3002\n ",binarySearch_item5:"\u8ba1\u6570\u4e8c\u5206",binarySearch_item5_keys:"\u672c\u8d28\u4e5f\u662f\u80fd\u529b\u68c0\u6d4b\uff0c\u56e0\u6b64\u548c\u80fd\u529b\u68c0\u6d4b\u6846\u67b6\u57fa\u672c\u4e00\u81f4\uff0c\u5927\u5bb6\u5bf9\u6bd4\u7406\u89e3\u4e00\u4e0b\u3002\n ",dp:"\u52a8\u6001\u89c4\u5212",dp_desc:"\n \u540c\u4e00\u7c7b\u578b\u7684\u4e0d\u540c\u9898\u76ee\u6846\u67b6\u57fa\u672c\u4e00\u81f4\uff0c\u4f46\u7ec6\u8282\u7565\u6709\u4e0d\u540c\uff0c\u6a21\u677f\u4ee3\u7801\u4ec5\u4ee5\u67d0\u4e00\u79cd\u4e3a\u4f8b\u8fdb\u884c\u8bb2\u8ff0\uff0c\u5927\u5bb6\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5fae\u8c03\u3002\n \n \u52a8\u6001\u89c4\u5212\u4e09\u628a\u65a7\uff1a\u72b6\u6001\uff0c\u679a\u4e3e\uff0c\u8f6c\u79fb\u65b9\u7a0b\uff08\u9009\u62e9\uff09\u3002\u5bf9\u4e8e\u6bcf\u4e00\u79cd\u9898\u76ee\uff0c\u6211\u90fd\u5c3d\u91cf\u6309\u7167\u8fd9\u4e09\u70b9\u7ed9\u5927\u5bb6\u63d0\u793a\u3002\n \n \u5f53\u7136\u8fd9\u4e2a\u5b66\u4e60\u8def\u7ebf\u662f\u7ed9\u6709\u4e00\u4e9b\u57fa\u7840\u7684\u4eba\u770b\u7684\uff0c\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u57fa\u7840\uff0c\u53ef\u4ee5\u770b\u4e0b\u76f8\u5173\u6587\u7ae0\uff0c\u4e4b\u540e\u6211\u4e5f\u4f1a\u5199\u4e00\u7bc7\u786c\u6838\u5957\u8def\u6587\u3002\n ",dp_item1:"\u5355\u5b57\u7b26\u4e32\u578b",dp_item1_keys1:"\u72b6\u6001\uff1a\n 1. dp[i] \u8868\u793a\u4ee5 s[i] \u7ed3\u5c3e\u7684 xxxx\n 2. dp[i] \u8868\u793a\u5230 s[i] \u4e3a\u6b62\u7684 xxxx\n ",dp_item1_keys2:"\u679a\u4e3e\uff1a\u901a\u5e38\u90fd\u662f\u4e24\u5c42\u5faa\u73af\uff0c\u4e00\u5c42\u5faa\u73af\u56fa\u5b9a\u5de6\u7aef\u70b9\uff0c\u53e6\u4e00\u5c42\u5faa\u73af\u56fa\u5b9a\u53f3\u7aef\u70b9\u8fdb\u884c\u679a\u4e3e",dp_item1_keys3:"\u8f6c\u79fb\u65b9\u7a0b\uff1a\u6839\u636e\u9898\u76ee\u9009\u62e9\u662f\u5426\u548c s[j] \u7ed3\u5408\uff0c\u53d6\u6700\u5927\uff0c\u6700\u5c0f\u6216\u8ba1\u6570\u5373\u53ef",dp_item2:"\u53cc\u5b57\u7b26\u4e32\u578b",dp_item2_keys1:"\u72b6\u6001\uff1a\n 1. dp[i][j] \u8868\u793a\u4ee5 s1[i],s2[j] \u7ed3\u5c3e\u7684 xxxx\n 2. dp[i][j] \u8868\u793a\u5230 s1[i],s2[j] \u4e3a\u6b62\u7684 xxxx\n ",dp_item2_keys2:"\u679a\u4e3e\uff1a\u901a\u5e38\u90fd\u662f\u4e24\u5c42\u5faa\u73af\uff0c\u4e00\u5c42\u5faa\u73af\u56fa\u5b9a s1 \u7684\u53f3\u7aef\u70b9\uff0c\u53e6\u4e00\u5c42\u5faa\u73af\u56fa\u5b9a s2 \u7684\u53f3\u7aef\u70b9\u8fdb\u884c\u679a\u4e3e",dp_item2_keys3:"\u72b6\u6001\u8f6c\u79fb\uff1a\u6839\u636e\u9898\u76ee\u4ee5\u53ca s[i]\uff0c s[j] \u7684\u5173\u7cfb\uff0c\u53d6\u6700\u5927\uff0c\u6700\u5c0f\u6216\u8ba1\u6570\u5373\u53ef",dp_item3:"\u722c\u697c\u68af\u578b",dp_item3_keys1:"\u72b6\u6001\uff1a\n 1. \u4e00\u7ef4\u901a\u5e38\u662f dp[i] \u8868\u793a\u4ee5 nums[i] \u7ed3\u5c3e\u7684 xxxx\n 2. \u4e8c\u7ef4\u901a\u5e38\u662f dp[i][j] \u8868\u793a\u4ee5 grid[i][j] \u7ed3\u5c3e\u7684 xxxx\n ",dp_item3_keys2:"\u679a\u4e3e\uff1a\u4e00\u7ef4\u5c31\u662f\u4e00\u5c42\u5faa\u73af\u679a\u4e3e\u6240\u6709\u7684 nums\uff0c\u4e8c\u7ef4\u5c31\u662f\u4e24\u5c42\u5faa\u73af\u679a\u4e3e\u6240\u6709\u7684 grid",dp_item3_keys3:"\u72b6\u6001\u8f6c\u79fb\uff1a\n 1. \u4e00\u7ef4\u901a\u5e38\u662f\u5f53\u524d\u683c\u5b50\u548c\u524d\u9762\u7684\u4e24\u4e2a\u683c\u5b50\u7684\u5173\u7cfb\uff0c\u53ef\u80fd\u662f\u6700\u5927\u6700\u5c0f\u6216\u8ba1\u6570\u3002 \n dp[i] = dp[i - 1] + dp[i - 2]\uff0c\u8fd9\u4e5f\u53eb\u9012\u63a8\u5f0f\uff0c\u56e0\u4e3a\u4e0d\u6d89\u53ca\u51b3\u7b56\u3002\n 2. \u4e8c\u7ef4\u901a\u5e38\u662f\u5f53\u524d\u683c\u5b50\u548c\u4e0a\u65b9\u4ee5\u53ca\u5de6\u65b9\u7684\u4e24\u4e2a\u683c\u5b50\u7684\u5173\u7cfb\uff0c\u53ef\u80fd\u662f\u6700\u5927\u6700\u5c0f\u6216\u8ba1\u6570\u3002\n dp[i][j] = dp[i - 1][j] + dp[i][j-1]\uff0c\u8fd9\u4e5f\u53eb\u9012\u63a8\u5f0f\uff0c\u56e0\u4e3a\u4e0d\u6d89\u53ca\u51b3\u7b56\u3002\n 3. \u6839\u8f6c\u79fb\u65b9\u7a0b\u4e0d\u96be\u770b\u51fa\uff0c \u8fd9\u79cd\u9898\u76ee\u901a\u5e38\u90fd\u53ef\u4ee5\u6eda\u52a8\u6570\u7ec4\u4f18\u5316\n ",dp_item4:"\u80cc\u5305\u578b\uff08\u4ec5\u5217\u4e3e\u9898\u76ee\uff09",dp_item5:"\u6570\u4f4d\u578b\uff08\u4ec5\u5217\u4e3e\u9898\u76ee\uff09",dp_item5_keys1:"\u5e38\u89c1\u7684 dp \u5b9a\u4e49\u4e3a dp[i][j] \u5176\u4e2d i \u4e3a\u6570\u5b57\u7684\u957f\u5ea6\uff0c j \u4e3a\u6700\u540e\u4e00\u4f4d\u7684\u6570\u3002\u6bd4\u5982 dp[3][2] \u8868\u793a\u8fd9\u4e2a\u6570\u4e00\u5171\u4e09\u4f4d\uff0c\u6700\u540e\u4e00\u4f4d\u662f 2 \u7684\u60c5\u51b5",dp_item6:"\u6982\u7387\u578b\uff08\u4ec5\u5217\u4e3e\u9898\u76ee\uff09",dp_item7:"\u535a\u5f08\u578b\uff08\u4ec5\u5217\u4e3e\u9898\u76ee\uff09",dp_item8:"\u533a\u95f4 DP",dp_item8_keys1:"\n \u53f3\u8fb9\u754c\u5012\u5e8f\u904d\u5386\uff0c\u5de6\u8fb9\u754c\u6b63\u5e8f\u904d\u5386\n ",dp_item8_keys2:"\u901a\u5e38\u90fd\u662f\u8fd4\u56de dp[0][n]\uff0c\u800c\u4e0d\u662f\u5176\u4ed6\u5e38\u89c1\u7684 dp[-1][-1]",dp_item9:"\u72b6\u6001\u538b\u7f29\u578b\uff08\u4ec5\u5217\u4e3e\u9898\u76ee\uff09",tree:"\u6811",linkedList:"\u94fe\u8868",clickToEnlarge:"\u5355\u51fb\u53ef\u653e\u5927",recommendedProblems:"\u63a8\u8350\u9898\u76ee"},checkForUpdates:{name:"\u68c0\u67e5\u66f4\u65b0"},aboutMe:{name:"\u5173\u4e8e\u6211"}}},106:function(e,t){e.exports={app:{name:"LeetCode Cheatsheet",preview:"Preview",copyMdOrigin:"Click to copy MarkDown origin",fullScreen:"Full Screen (Press ESC to exit)",toUse:"To Use",custom:"Custom",presets:"Presets",setLang:"Set Language",changeLang:"\u4e2d\u6587",copy:"copy",save:"save",yes:"yes",no:"no",delete:"delete",delTitle:"Are you sure you want to delete it?",deleteSuccess:"Delete successfully~",saveSuccess:"Save successfully~",copySuccess:"Copy successfully~",article:"article",recommendedQuestions:"Recommended Questions:",goForDictation:"go for dictation",contribution:"Correction or contribution to other languages",back:"Back to Home page",viewSolution:"View solution",viewInHandpickCollection:"This question has been collected in the handpick collection\u300a{slotText}\u300bClick to view",notCollected:"This question has not been collected by LeetCode Plus, click to view all collected questions",allCollected:"All collected questions",writingExplanation:"Writing explanation",goToTheWebsiteToUse:"Go to the website to use",checkTips:"Generally, as long as you turn on automatic updates, chrome will automatically update within five hours after the plug-in is updated. If you want to update as soon as possible, or if you disable automatic updates, you can check the latest version here.",checkBtn:"Check for updates",selfIntroduction:"The author is a front-end architect with 54K stars on Github, the author of the leetcode-cheatsheet leetcode plugin, master all kinds of algorithm routines, and wrote hundreds of thousands of words of algorithm brushing e-books. Reply to the public account [\u7535\u5b50\u4e66] to get.",allSolutions:{columns:{title:"Title",tag:"Tag"}},initializeContentScriptFailed:"Failed to initialize the chrome plugin content script",run:"Run",submit:"Submit",wirteSolution:"Write Solution",visualizationDebug:"Visualization Debug",linkedListCommnet:"If you are debugging linked list questions, it is very troublesome to generate linked lists manually. If you want to quickly generate linked lists, you can comment out the following method and use the following method to enter an array and return a linked list.",visualDebugComment:"Replace xxx below with the main function name, yyy with the test case parameter, and turn on debugging",getProblemError:"Failed to get the problem description, please switch to the problem description tab first",savingProblem:"Saving problem information, please wait~",githubAPIError:"Failed to use Github API, has been switched to normal mode, normal mode can only automatically bring in the problem name, link and solution language. if still unable to use, please try to unblock open the website from the browser address bar and retry.",notYet:"Not yet"},problem:{3:"3. Longest Substring Without Repeating Characters",10:"10. Regular Expression Matching",34:"34. Find First and Last Position of Element in Sorted Array",39:"39. Combination Sum",40:"40. Combination Sum II",44:"44. Wildcard Matching",46:"46. Permutations",47:"47. Permutations II",52:"52. N-Queens II",62:"62. Unique Paths",63:"63. Unique Paths II",64:"64. Minimum Path Sum",69:"69. Sqrt(x)",70:"70. Climbing Stairs",72:"72. Edit Distance",76:"76. Minimum Window Substring",78:"78. Subsets",90:"90. Subsets II",113:"113. Path Sum II",116:"116. Populating Next Right Pointers in Each Node",131:"131. Palindrome Partitioning",140:"140. Word Break II",148:"148. Sort List",174:"174. Dungeon Game",198:"198. House Robber",208:"208. Implement Trie (Prefix Tree)",209:"209. Minimum Size Subarray Sum",211:"211. Design Add and Search Words Data Structure",212:"212. Word Search II",233:"233. Number of Digit One",278:"278. First Bad Version","278_desc":"The idea of the leftmost and rightmost is the same. Everyone can practice two questions. The actual situation can use different binary search according to the meaning of the question.",292:"292. Nim Game",303:"303. Range Sum Query - Immutable(It is simpler to use one-dimensional prefix sums)",307:"307. Range Sum Query - Mutable",3187:"3187. Peaks in Array",327:"327. Count of Range Sum",322:"322. Coin Change",337:"337. House Robber III",357:"357. Count Numbers with Unique Digits",399:"399. Evaluate Division",416:"416. Partition Equal Subset Sum",438:"438. Find All Anagrams in a String",464:"464. Can I Win",472:"472. Concatenated Words",493:"493. Reverse Pairs",513:"513. Find Bottom Left Tree Value",518:"518. Coin Change 2",528:"528. Random Pick with Weight",540:"540. Single Element in a Sorted Array",547:"547. Number of Provinces",576:"576. Out of Boundary Paths(changed from selecting two directions to selecting four directions)",648:"648. Replace Words",662:"662. Maximum Width of Binary Tree",698:"698. Partition to K Equal Sum Subsets",721:"721. Accounts Merge",743:"743. Network Delay Time",778:"778. Swim in Rising Water","778_desc":"DFS + binary search, there are many similar questions, such as the 1439th question. This kind of question routine is very similar, and the difficulty is not big.",808:"808. Soup Servings",816:"816. Ambiguous Coordinates",820:"820. Short Encoding of Words",837:"837. New 21 Game",863:"863. All Nodes Distance K in Binary Tree",877:"877. Stone Game",902:"902. Numbers At Most N Given Digit Set",904:"904. Fruit Into Baskets",912:"912. Sort an Array",930:"930. Binary Subarrays With Sum",935:"935. Knight Dialer(Changed from selecting two directions to selecting eight directions)",990:"990. Satisfiability of Equality Equations",992:"992. Subarrays with K Different Integers",1004:"1004. Max Consecutive Ones III",1015:"1015. Smallest Integer Divisible by K",1032:"1032. Stream of Characters",1046:"1046. Last Stone Weight(This question needs to use a large top heap, but they are almost the same)",1140:"1140. Stone Game II",1109:"1109. Corporate Flight Bookings",1202:"1202. Smallest String With Swaps",1234:"1234. Replace the Substring for Balanced String",1248:"1248. Count Number of Nice Subarrays",1255:"1255. Maximum Score Words Formed by Letters",1314:"1314. Matrix Block Sum",1406:"1406. Stone Game III",1462:"1462. Course Schedule IV",1480:"1480. Running Sum of 1d Array",1510:"1510. Stone Game IV",1563:"1563. Stone Game V",1584:"1584. Min Cost to Connect All Points",1649:"1649. Create Sorted Array through Instructions",1681:"1681. Minimum Incompatibility",1686:"1686. Stone Game VI","1686_desc":'Except for this one, the other "Stone Game" ideas are basically the same',1690:"1690. Stone Game VII",1886:"1886. Determine Whether Matrix Can Be Obtained By Rotation",2536:"2536. Increment Submatrices by One",2569:"2569. Handling Sum Queries After Update",2736:"2736. Maximum Sum Queries",2867:"2867. Number of Valid Paths in a Tree",minimumLightRadius:"Minimum Light Radius",minimumLightRadius_desc:"Classic ability detection binary search, leetcode also has a similar topic",kthPairDistance:"Kth Smallest Distance Pair",kthPairDistance_desc:"Typical counting binary search, which is essentially an ability test, but the number of questions is large, so it is separated.",increasingDigits:"Increasing Digits",palindromicInsertions:"Palindromic Insertions",palindromicInsertions_desc:"For interval dynamic programming, it is necessary to proceed simultaneously from both ends of the sequence, rather than from one end of the sequence to the other.",JZ51:"Sword Offer 51. Reverse pairs in an array",interview17_13:"Interview 17.13. Re-Space LCCI",interview17_13__desc:"CHow to practice the details? 1? - 1? How to initialize? You can learn through this question ~",longestIncreasingSubsequence:"Longest Increasing Subsequence Series",longestIncreasingSubsequence_desc:"Series classic topic, worth doing",littleRabbitsChessboard:"Little Rabbit's Chessboard",shopeesOffice:"Shopee's Office"},codeTemplate:{name:"Code Template",perSum:{title:"Prefix Sum",tips:"It is recommended to learn it first and then use the template. If you don't know it yet, you can take a look at this article",item1:"One-dimensional prefix sum",item2:"Two-dimensional prefix sum",item3:"One-dimensional difference array",item4:"Two-dimensional difference array"},graph:{title:"Graph",item1:"dijkstra(single-source greedy shortest path)",item1_desc1:"For example, consider a graph like this:",item1_desc2:"We construct it using an adjacency matrix:",item2:"floyd_warshall(multi-source dynamic programming shortest path)",item3:"Bellman\u2013Ford(single-source dynamic programming shortest path)",item4:"Kruskal(also known as adding edge method, is a minimum spanning tree algorithm)",item5:"Prim(also known as adding point method, is a minimum spanning tree algorithm)",item6:"Kahn(topological sorting based on BFS)"},binarySearch:{title:"Binary Search",item1:"Find a number",item2:"Find the leftmost value that satisfies the condition",item3:"Find the rightmost value that satisfies the condition",item4:"Find the leftmost insertion position",item5:"Find the rightmost insertion position"},BFS:{item1:"With layer information",item2:"Without layer information"},heap:{title:"Heap",item1:"Min Heap",item2:"Two Heaps"},slidingWindow:{title:"Sliding Window",item1:"Fixed length sliding window",item1_text:"\n Initialize front and back pointers to 0.\n Initialize ans.\n\n for front in iterable\n update window info (front in, back out)\n move back pointer\n update ans\n return ans\n ",item2:"Variable length sliding window",item2_text:"\n Initialize the slow pointer to 0.\n Initialize ans.\n\n for fast pointer in iterable collection\n update information in the window\n while the window does not satisfy the question\n expand or shrink the window\n move the slow pointer\n update the answer\n return ans\n "},backtrack:{title:"Backtrack",item1:"Standard backtrack",item2:"Cartesian product optimization"},trie:{title:"Trie",item1:"Standard Trie"},uf:{title:"Union Find",item1:"Union Find without weight",item2:"Union Find with weight"},segmentTree:{title:"Segment Tree and Binary Indexed Tree",item1:"Interval and segment tree",item2:"Interval sum with lazy propagation (interval update) segment tree",item3:"Counting segment tree",item4:"Dynamic allocation of nodes",item5:"Binary Indexed Tree"},handWriting:{title:"Hand Writing",item1:"Sort an array",item2:"Sort a linked list"},rotate:{title:"Rotate",item1:"Rotate the 2D matrix 90 degrees clockwise."},prime:{title:"Prime",item1:"Prime screening method"},suffixArray:{title:"Suffix Array",item1:"Standard version"},moreTemplate:"More templates will be updated one after another~"},dataStructureVisualization:{name:"Data Structure Visualization",incrementalUsage:"Incremental Usage",explain1:'The editing function is not supported. If you need to edit, you can do so indirectly by first "use", then "save", and finally "delete" the original data.',explain2:"Templates can be used incrementally. Click the drop-down triangle of 'to use' and select Incremental Usage.",explain3:"The template will be generated according to the position of your mouse. For example, if your mouse is at point (100, 100), the template will be offset by (100, 100) units as a whole. If the template is not exactly at (100, 100), it means that the template itself was not created with (0, 0) as the top-left corner. When creating custom templates, it's important to keep this in mind.",explain4:"You can also choose to use the native excalidraw directly "},explanationTemplate:{name:"Explanation Template",code:"Code",goToTheWebsiteToUse:"Go to the website to use",problemAddress:"Problem Address",problemDesc:"Problem Description",preKnowledge:"Pre Knowledge",company:"Company",thinking:"Thinking",keyPoints:"Key Points",languageSupport:"Language Support",complexityAnalysis:"Complexity Analysis",complexityDeclare:"Let n be the length of the array.",timeComplexity:"Time Complexity",spaceComplexity:"Space Complexity",howToUse:"How to use it?",programmingLanguage:"Programming Language:",commonFormulas:"Common formulas (click to copy):",noBackup:"No backup file found",restore:"Restore last edit content",backupTips:"The explanation is backed up every five seconds. If you accidentally refresh the browser, you can click the restore button below to restore it. Since it is an overwrite backup, only the last edited content will be saved.",afterUpdateTemplateTips:"More explanation templates will be provided later.",afterUpdateThemeTips:"More themes and user-defined themes will be supported later."},complexityQuickCheck:{name:"Complexity Quick Check",tips:"Don't understand why? Click here",dataScale:"Data Scale",timeComplexity:"Algorithm acceptable time complexity"},learningRoute:{name:"Learning Route",binarySearch:"Binary Search",binarySearchDesc:"\n If you ask me to summarize binary search in one sentence, I would say that binary search is an algorithm that makes the unknown world inorganic. That is, no matter what, we can discard half of the solutions, that is, we can cut the solution space in half.\n The difficulty is two points: **what conditions** and **which part to discard**. This is the core problem that binary search needs to solve.\n\n There are two basic types of tactics, namely the leftmost insertion binary search and the rightmost insertion binary search.\n\n There are four basic types of strategies: ability detection binary search, prefix sum binary search, insertion sort binary search, and counting binary search.\n\n These two parts are very practical. While understanding these two parts, please keep in mind a central point **half**.\n\n For more information, please visit: https://lucifer.ren/blog/2021/03/08/binary-search-1",binarySearch_item1:"Leftmost/Rightmost Binary Search",binarySearch_item1_text:"Code reference: Code templates - Binary",binarySearch_item1_keys:"\n 1. shrink the right boundary continuously and finally return the left boundary\n 2. shrink the left boundary continuously and finally return the right boundary\n ",binarySearch_item2:"Ability Detection Binary Search",binarySearch_item2_keys:'Define the function that the possible argument is mid and the return value is a Boolean value. The outer layer adjusts according to the return value "; Solution space" . The sample code is an example of the leftmost binary.\n ',binarySearch_item3:"Prefix Sum Binary Search",binarySearch_item3_keys:"\n If the array is non-negative, then the prefix sum is a monotone non-decrement array, and we can sometimes make dichotomies based on it.\n ",binarySearch_item4:"Insertion Sort Binary Search",binarySearch_item4_keys:"\n Continuously insert and maintain the ordered sequence, and then use the ordered sequence to do something.\n ",binarySearch_item5:"Counting Binary Search",binarySearch_item5_keys:"The essence is also ability detection, so it is basically the same as the ability detection framework. Everyone compares and understands.\n ",dp:"Dynamic Programming",dp_desc:"\n The basic framework for different problems of the same type is generally consistent, but with slight variations in details. The template code is explained using a specific type as an example, and individuals should make adjustments based on the actual situation.\n\n The three key points for dynamic programming are: state, enumeration, and transition equations (choices). For each type of problem, I try to provide hints based on these three points.\n \n Of course, this learning path is intended for those with some foundation. If you don't have a foundation yet, you can refer to related articles. I will also write a comprehensive routine article in the future.",dp_item1:"Single string type",dp_item1_keys1:"State:\n 1. dp[i] represents the xxxx ending with s[i]\n 2. dp[i] represents the xxxx up to s[i]",dp_item1_keys2:"Enumeration: It usually involves two nested loops, where one loop fixes the left endpoint and the other loop fixes the right endpoint for enumeration.",dp_item1_keys3:"Transition equation: Based on the problem, choose whether to combine with s[j], then take the maximum, minimum, or count as required.",dp_item2:"Double string type",dp_item2_keys1:"State: \n 1. dp[i][j] represents the xxxx ending with s1[i], s2[j]\n 2. dp[i][j] represents the xxxx up to s1[i], s2[j]",dp_item2_keys2:"Enumeration: Typically, it involves two nested loops, where one loop fixes the right endpoint of s1, and the other loop fixes the right endpoint of s2 for enumeration.",dp_item2_keys3:"State transition: Based on the problem and the relationship between s[i] and s[j], take the maximum, minimum, or count as required.",dp_item3:"Sequence type",dp_item3_keys1:"State: \n 1. In one-dimensional arrays, dp[i] usually represents the xxxx ending with nums[i]\n 2. In two-dimensional arrays, dp[i][j] usually represents the xxxx ending with grid[i][j]",dp_item3_keys2:"Enumeration: One-dimensional involves a single loop to enumerate all nums, while two-dimensional involves two loops to enumerate all grid.",dp_item3_keys3:'State transition:\n 1. In one dimension, it usually involves the relationship between the current cell and the preceding two cells, possibly involving maximum, minimum, or counting.\n dp[i] = dp[i - 1] + dp[i - 2]" This is also called a recurrence relation because it does not involve decision-making.\n 2. In two dimensions, it usually involves the relationship between the current cell and its upper and left adjacent cells, possibly involving maximum, minimum, or counting.\n dp[i][j] = dp[i - 1][j] + dp[i][j-1]" This is also called a recurrence relation because it does not involve decision-making.\n 3. From the transition equation, it\'s not difficult to see that this type of problem can usually be optimized using rolling arrays.\n ',dp_item4:"Backpack type(List only the problems)",dp_item5:"Number type(List only the problems)",dp_item5_keys1:"The common definition of dynamic programming is represented as dp[i][j], where i stands for the length of the number, and j represents the last digit. For example, dp[3][2] denotes a number with a total of three digits, with 2 as the last digit.",dp_item6:"Probability type(List only the problems)",dp_item7:"Game type(List only the problems)",dp_item8:"Interval DP",dp_item8_keys1:"\n Traversing in reverse from the right boundary and in forward from the left boundary\n ",dp_item8_keys2:"Typically, the return value is dp[0][n], rather than other common dp[-1][-1].",dp_item9:"State compression type(List only the problems)",tree:"Tree",linkedList:"Linked List",clickToEnlarge:"Click to enlarge",recommendedProblems:"Recommended Problems"},checkForUpdates:{name:"Check for Updates"},aboutMe:{name:"About Me"}}},23:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return i}))},28:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"k",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return m})),n.d(t,"i",(function(){return h})),n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return y}));var i=n(82);function r(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=Object(i.a)(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}var o=n(23);n(34);function a(e){try{var t=document.createElement("textarea");return t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}catch(n){return!1}}function s(){return"extension"===Object({NODE_ENV:"production",PUBLIC_URL:"/leetcode-cheat",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).REACT_APP_BUILD_TARGET}function c(e){return new URLSearchParams(window.location.search).get(e)}function l(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function u(e,t){var n=document.createElement("textarea");n.textContent=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),n.blur(),document.body.removeChild(n),t instanceof Function&&t()}function d(e){return new Promise((function(t,n){try{chrome.storage?chrome.storage.get([e],t):localStorage?t({result:{value:JSON.parse(localStorage.getItem(e))}}):n("\u672a\u77e5\u9519\u8bef")}catch(i){n(i)}}))}function m(e,t){return new Promise((function(n,i){try{chrome.storage?chrome.storage.sync.set(Object(o.a)({},e,t),n):localStorage?(localStorage.setItem(e,JSON.stringify(t)),n()):i("\u60a8\u53ef\u80fd\u7981\u7528\u4e86\u5b58\u50a8\u529f\u80fd~")}catch(r){console.log(r,e,t),i("\u5f53\u524d\u6ca1\u6709\u5b58\u50a8\u6743\u9650\uff0c\u6216\u8005\u5b58\u50a8\u5df2\u8fbe\u5230\u4e0a\u9650~")}}))}function h(e,t){t.token;return fetch("https://my-store2.p.rapidapi.com/order/new",{method:"POST",headers:{"content-type":"application/json","x-rapidapi-key":"8be902d767mshf5d232d6b781084p166217jsn382abe83434f","x-rapidapi-host":"my-store2.p.rapidapi.com"},body:JSON.stringify({customer:JSON.stringify({body:e}),address:""})}).then((function(e){return e.json()}))}function p(e,t){t.token;return fetch("https://my-store2.p.rapidapi.com/order/".concat(e),{method:"GET",headers:{"x-rapidapi-key":"8be902d767mshf5d232d6b781084p166217jsn382abe83434f","x-rapidapi-host":"my-store2.p.rapidapi.com"}}).then((function(e){return e.json()})).then((function(e){return JSON.parse(e.order.customer).body}))}function f(e,t){var n=e,i=null;return function(){var e=this,r=arguments;clearTimeout(i),i=setTimeout((function(){n.apply(e,r)}),t)}}var y=function(e,t){var n,i=e,o=r(t.split("."));try{for(o.s();!(n=o.n()).done;){i=i[n.value]}}catch(a){o.e(a)}finally{o.f()}return i}},34:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var i="https://leetcode.cn",r="https://leetcode.com",o="https://github.com/azl397985856/leetcode-cheat/issues",a="https://github.com/azl397985856/leetcode-cheat/issues/1",s="https://github.com/azl397985856/leetcode-cheat/issues/4"},6:function(e,t,n){"use strict";n.r(t),n.d(t,"lang",(function(){return m})),n.d(t,"setLang",(function(){return p})),n.d(t,"initLang",(function(){return f})),n.d(t,"getLeetcodeUrlForLang",(function(){return y})),n.d(t,"t",(function(){return g}));var i=n(81),r=n(28),o=n(34),a=n(105),s=n.n(a),c=n(106),l=n.n(c);function u(){u=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(P){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),s=new T(r||[]);return i(a,"_invoke",{value:S(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(P){return{type:"throw",arg:P}}}e.wrap=l;var m={};function h(){}function p(){}function f(){}var y={};c(y,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(C([])));b&&b!==t&&n.call(b,o)&&(y=b);var v=f.prototype=h.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var r;i(this,"_invoke",{value:function(i,o){function a(){return new t((function(r,a){!function i(r,o,a,s){var c=d(e[r],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}})}function S(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return L()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=d(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function _(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var r=d(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,m;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=f,i(v,"constructor",{value:f,configurable:!0}),i(f,"constructor",{value:p,configurable:!0}),p.displayName=c(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,s,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},x(w.prototype),c(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var a=new w(l(t,n,i,r),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(v),c(v,s,"Generator"),c(v,o,(function(){return this})),c(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=C,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;I(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),m}},e}var d=!1,m="zh",h={zh:s.a,en:l.a},p=function(e){m=e||"zh"},f=function(){var e=Object(i.a)(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!d){e.next=2;break}return e.abrupt("return");case 2:n=t.includes(o.e),p(n?"en":"zh"),d=!0;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){return"zh"===m?o.d:o.e},g=function(e,t,n){var i={Locale:h[n||m]};if(!e)return"";e.includes("Locale")||(e="Locale."+e);var o=Object(r.e)(i,e);return t&&(Array.isArray(t)?t.forEach((function(e,t){o=o.replace("{".concat(t,"}"),e)})):o=o.replace("{slotText}",t)),o};t.default=h[m]},653:function(e,t,n){"use strict";n.r(t);var i=n(28);function r(){return function(){var e=document.querySelector("div[data-key=submissions-content]");if((null===e||void 0===e?void 0:e.children.length)>0){var t=e.querySelector("div[data-cypress=SubmissionSuccess]");if(!t)return!1;if(!("error"===t.getAttribute("type")))return!0;var n=e.children[0].children[0].children[0].children[0].children[2],i=e.children[0].children[0].children[0].children[0].children[3],r=e.children[0].children[0].children[0].children[0].children[4];if(n.style.display="none",i.style.display="none",r.style.display="none",!document.querySelector("#leetcode-cheat-show-fail-cases")){var o=document.createElement("div");o.id="leetcode-cheat-show-fail-cases";var a=document.createElement("span");a.innerText="\u8bf7\u5148\u5c1d\u8bd5\u81ea\u5df1\u89e3\u51b3\uff0c\u5982\u679c\u5b9e\u5728\u65e0\u6cd5\u89e3\u51b3\u518d\u5c1d\u8bd5\u663e\u793a\u5931\u8d25\u7684\u6d4b\u8bd5\u7528\u4f8b\uff01",a.style["margin-right"]="20px",a.style["line-height"]="32px";var s=document.createElement("a");s.innerText="\u70b9\u51fb\u663e\u793a\u5931\u8d25\u7684\u6d4b\u8bd5\u7528\u4f8b",s.style["margin-right"]="20px",s.style["line-height"]="32px",s.onclick=function(){n.style.display="block",i.style.display="block",r.style.display="block"},o.appendChild(a),o.appendChild(s),e.children[0].children[0].children[0].children[0].insertBefore(o,n)}return!0}return!1}()}var o=n(6),a=document.documentElement.lang,s=function(e,t){return Object(o.t)(e,t,a)},c=function(e){var t=e.content;window.alert(t)},l=function(e){return function(){return null}};function u(){var e,t,n,i,r=d(),o=["Python3","JavaScript","C++"],a={Python3:"\n # ".concat(s("app.linkedListCommnet"),"\n # eg\uff1ahead = ListNodes([4,2,1,3]).head\n # class ListNodes:\n # def __init__(self, vals)->ListNode:\n # cur = dummy = ListNode() \n # for val in vals:\n # nxt = ListNode(val)\n # cur.next = nxt\n # cur = nxt\n # self.head = dummy.next\n"),JavaScript:"\n// ".concat(s("app.linkedListCommnet"),"\n// eg\uff1ahead = ListNodes([4,2,1,3]).head\n// function ListNodes(vals) {\n// let cur = new ListNode()\n// let dummy = cur\n// for(const val of vals) {\n// const nxt = new ListNode(val)\n// cur.next = nxt\n// cur = nxt\n// }\n// return dummy.next\n// } \n"),java:"","C++":"\n#include <algorithm>\n#include <bitset>\n#include <complex>\n#include <deque>\n#include <exception>\n#include <fstream>\n#include <functional>\n#include <iomanip>\n#include <ios>\n#include <iosfwd>\n#include <iostream>\n#include <istream>\n#include <iterator>\n#include <limits>\n#include <list>\n#include <locale>\n#include <map>\n#include <memory>\n#include <new>\n#include <numeric>\n#include <ostream>\n#include <queue>\n#include <set>\n#include <sstream>\n#include <stack>\n#include <stdexcept>\n#include <streambuf>\n#include <string>\n#include <typeinfo>\n#include <utility>\n#include <valarray>\n#include <vector>\n\n#if __cplusplus >= 201103L\n#include <array>\n#include <atomic>\n#include <chrono>\n#include <condition_variable>\n#include <forward_list>\n#include <future>\n#include <initializer_list>\n#include <mutex>\n#include <random>\n#include <ratio>\n#include <regex>\n#include <scoped_allocator>\n#include <system_error>\n#include <thread>\n#include <tuple>\n#include <typeindex>\n#include <type_traits>\n#include <unordered_map>\n#include <unordered_set>\n#endif\n\nusing namespace std; \n",C:""},l={Python3:"\n# ".concat(s("app.visualDebugComment"),"\nSolution().xxx(yyy)\n"),JavaScript:"\n// ".concat(s("app.visualDebugComment"),"\nxxx(yyy)\n"),"C++":"\nint main()\n{\n Solution s;\n // ".concat(s("app.visualDebugComment"),"\n s.xxx(yyy);\n return 0;\n}\n"),C:"",Java:""};if(!o.includes(r))return c({content:"".concat(s("app.visualDebugSupport")," ").concat(o.join(","))});var u=(a[r]||"")+(null===(e=window)||void 0===e||null===(t=e.monaco)||void 0===t||null===(n=t.editor)||void 0===n||null===(i=n.getModels()[0])||void 0===i?void 0:i.getValue())+(l[r]||"");window.open("https://pythontutor.com/visualize.html#code=".concat(encodeURIComponent(u),"&cumulative=false&curInstr=0&heapPrimitives=nevernest&mode=display&origin=opt-frontend.js&py=").concat({Python3:"3",Java:"java",JavaScript:"js","C++":"cpp_g%2B%2B9.3.0",C:"c_gcc9.3.0"}[r],"&rawInputLstJSON=%5B%5D&textReferences=false"))}function d(){var e,t,n,i;return{cpp:"C++",python3:"Python3",java:"Java",c:"C",javascript:"JavaScript"}[((null===(e=window)||void 0===e||null===(t=e.monaco)||void 0===t||null===(n=t.editor)||void 0===n||null===(i=n.getModels()[0])||void 0===i?void 0:i.getLanguageId())||localStorage.getItem("global_lang")).toLowerCase()]}var m=!1,h=0,p=!1,f=setInterval((function(){return m&&p?clearInterval(f):h>10?(clearInterval(f),console.error(s("app.initializeContentScriptFailed"))):void(document.title.includes("\u529b\u6263\u52a0\u52a0")||(!function(){for(var e={"line-height":"1",cursor:"pointer","vertical-align":"text-top"},t=document.querySelectorAll("button"),n=function(){if(t[o].innerText.includes(s("Locale.app.run"))){var n=document.createElement("a");n.innerText=s("Locale.app.wirteSolution"),Object.assign(n.style,e),n.className=t[o].className,n.onclick=function(){var e,t,r,o;console.log("writeSolutionButton");var a=document.querySelector('[data-track-load="description_content"]').innerHTML;if(!a)return c({content:s("app.getProblemError")});var u=document.title,m=window.location.href,h=d(),p=null===(e=window)||void 0===e||null===(t=e.monaco)||void 0===t||null===(r=t.editor)||void 0===r||null===(o=r.getModels()[0])||void 0===o?void 0:o.getValue(),f=l(s("app.savingProblem"),0);console.log("writeSolutionButton",u,m,h,p,a),n.setAttribute("disabled",!0),setTimeout((function(){f(),n.removeAttribute("disabled")}),3e4),Object(i.f)("leetcode-cheatsheet-token").then((function(e){return e.result.value})).then((function(e){if(!e.raw)throw new Error("whatever");return e})).catch((function(){return{raw:"e574bf60b50d8d2d2db2320ee83aba3cd29cecf2"}})).then((function(e){var t=e.raw;console.log("getStorage",t),Object(i.i)({title:u,link:m,language:h,code:p,desc:a},{token:t}).then((function(e){console.log("setCloundStorage",e),f(),n.removeAttribute("disabled"),e.id?window.open("https://leetcode-pp.github.io/leetcode-cheat/?issue_number=".concat(e.id,"&tab=solution-template")):(c({content:s("app.githubAPIError")}),setTimeout((function(){var e="https://leetcode-pp.github.io/leetcode-cheat/?title=".concat(u,"&link=").concat(m,"&language=").concat(h,"&tab=solution-template");console.log("window.open",e),window.open(e)}),1e3))})).catch((function(){console.log("setCloundStorage","catch"),f(),n.removeAttribute("disabled"),c({content:s("app.githubAPIError")}),setTimeout((function(){window.open("https://leetcode-pp.github.io/leetcode-cheat/?title=".concat(u,"&link=").concat(m,"&language=").concat(h,"&tab=solution-template"))}),1e3)}))}))};var h=document.createElement("a");h.innerText=s("Locale.app.visualizationDebug"),Object.assign(h.style,e),h.className=t[o].className,h.onclick=u,"en"===a?(t[o].parentElement.prepend(h),t[o].parentElement.prepend(n)):(t[o].parentElement.parentElement.prepend(n),t[o].parentElement.parentElement.prepend(h)),m=!0}else if(t[o].innerText.includes(s("app.submit"))){var f=t[o].onclick,y=t[o];t[o].onclick=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];f.call.apply(f,[y].concat(t));var i=0,o=setInterval((function(){r()&&clearInterval(o),i>300||i++}),100)},p=!0}},o=0;o<t.length;++o)n()}(),h++))}),1e3)},81:function(e,t,n){"use strict";function i(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(i,r)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,c,"next",e)}function c(e){i(a,r,o,s,c,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return r}))},82:function(e,t,n){"use strict";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function r(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}n.d(t,"a",(function(){return r}))}});
//# sourceMappingURL=content.js.map