
document.body.insertAdjacentHTML('afterBegin', ` `)
给你一个字符串 s ,找出它的所有子串并按字典序排列,返回排在最后的那个子串。 示例 1: 输入:s = "abab"
输出:"bab"
解释:我们可以找出 7 个子串 ["a", "ab", "aba", "abab", "b", "ba", "bab"]。按字典序排在最后的子串是 "bab"。
示例 2: 输入:s = "leetcode"
输出:"tcode"
提示: 1 <= s.length <= 4 * 105 s 仅含有小写英文字符。 Related Topics双指针字符串
👍 202👎 0
const vditorCDN = "http://localhost:63343/3e41525e-e74a-4590-ba1d-982b8f638478/resources/vditor"; const vditorThemeCDN = "http://localhost:63343/3e41525e-e74a-4590-ba1d-982b8f638478/resources/vditor/dist/css/content-theme"; const darcula = "true" == "true"; window.onload = function () { $(".vditor-toolbar")[0].remove(); $(".vditor-sv")[0].remove(); $(".vditor-preview").find(".vditor-reset").css("max-width","90%" ) } const vditor = new Vditor('vditor', { "mode": "sv", "theme": darcula ? "dark" : "light", "lang": "zh_CN", "cache": { "enable": false }, "toolbarConfig": {"hide": true}, "cdn": vditorCDN, "preview": { "theme": { "current": darcula ? "idea-dark" : "idea-light", "path": vditorThemeCDN }, "maxWidth": $(window).width() - 100, "actions": [], "hljs": {"style": darcula ? "dracula" : "github"}, "math": { "inlineDigit": true } }, "value": document.getElementById("fileValue").innerText }); function updateStyle(style,darcula){ let newStyle = document.createElement('style'); newStyle.id = 'ideaStyle'; newStyle.innerHTML = style; let oldStyle = document.getElementById('ideaStyle'); oldStyle.parentNode.replaceChild(newStyle,oldStyle); vditor.setTheme(darcula? "dark" : "light",darcula ? "idea-dark" : "idea-light",darcula ? "dracula" : "github",vditorThemeCDN) } .vditor--dark{--panel-background-color:rgba(26,36,38,1.00);--textarea-background-color:rgba(26,36,38,1.00);--toolbar-background-color:rgba(38,50,56,1.00);}::-webkit-scrollbar-track {background-color:rgba(26,36,38,1.00);}::-webkit-scrollbar-thumb {background-color:rgba(166,166,166,0.28);}.vditor-reset {font-size:13px;font-family:"JetBrains Mono","Helvetica Neue","Luxi Sans","DejaVu Sans","Hiragino Sans GB","Microsoft Yahei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Segoe UI Symbol","Android Emoji","EmojiSymbols";color:rgba(175,185,195,1.00);} body{background-color: rgba(26,36,38,1.00);}