// ==UserScript==
// @name Enhanced AlgoCasts
// @namespace algocasts-enhanced
// @version 0.6.1
// @description 优化 AlgoCasts 的 OJ 超链接,使得点击 /episodes 页面里 leetcode/lintcode badge 可以直接跳转到指定题目,同时隐藏该页面数字最后的点(但依然可被用于搜索);在 Leetcode 刷题页面可跳转到 AlgoCasts 讲解(目前支持到 AlgoCasts 150 题)
// @note 0.6.1 版本起可以通过将「Storage」页面中的 configs.leetcode_region 配置由 global 修改为 china 来使得 OJ 跳转目标改为 LeetcodeCN
// @author Singee
// @match *://algocasts.io/episodes*
// @match *://algocasts.io/series/*/episodes*
// @match *://leetcode.com/problems/*/
// @match *://leetcode-cn.com/problems/*/
// @require https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js
// @grant GM_xmlhttpRequest
// @grant GM_getValue
// @grant GM_setValue
// @run-at document-end
// ==/UserScript==
const leetcode_slug = {"1015": "numbers-with-repeated-digits", "1008": "construct-binary-search-tree-from-preorder-traversal", "1007": "minimum-domino-rotations-for-equal-row", "1006": "clumsy-factorial", "1005": "maximize-sum-of-array-after-k-negations", "1004": "max-consecutive-ones-iii", "1003": "check-if-word-is-valid-after-substitutions", "1002": "find-common-characters", "1001": "grid-illumination", "1000": "minimum-cost-to-merge-stones", "999": "available-captures-for-rook", "998": "maximum-binary-tree-ii", "997": "find-the-town-judge", "996": "number-of-squareful-arrays", "995": "minimum-number-of-k-consecutive-bit-flips", "994": "rotting-oranges", "993": "cousins-in-binary-tree", "992": "subarrays-with-k-different-integers", "991": "broken-calculator", "990": "satisfiability-of-equality-equations", "989": "add-to-array-form-of-integer", "988": "smallest-string-starting-from-leaf", "987": "vertical-order-traversal-of-a-binary-tree", "986": "interval-list-intersections", "985": "sum-of-even-numbers-after-queries", "984": "string-without-aaa-or-bbb", "983": "minimum-cost-for-tickets", "982": "triples-with-bitwise-and-equal-to-zero", "981": "time-based-key-value-store", "980": "unique-paths-iii", "979": "distribute-coins-in-binary-tree", "978": "longest-turbulent-subarray", "977": "squares-of-a-sorted-array", "976": "largest-perimeter-triangle", "975": "odd-even-jump", "974": "subarray-sums-divisible-by-k", "973": "k-closest-points-to-origin", "509": "fibonacci-number", "972": "equal-rational-numbers", "971": "flip-binary-tree-to-match-preorder-traversal", "970": "powerful-integers", "969": "pancake-sorting", "968": "binary-tree-cameras", "967": "numbers-with-same-consecutive-differences", "966": "vowel-spellchecker", "965": "univalued-binary-tree", "964": "least-operators-to-express-number", "963": "minimum-area-rectangle-ii", "962": "maximum-width-ramp", "961": "n-repeated-element-in-size-2n-array", "960": "delete-columns-to-make-sorted-iii", "959": "regions-cut-by-slashes", "958": "check-completeness-of-a-binary-tree", "957": "prison-cells-after-n-days", "956": "tallest-billboard", "955": "delete-columns-to-make-sorted-ii", "954": "array-of-doubled-pairs", "953": "verifying-an-alien-dictionary", "952": "largest-component-size-by-common-factor", "951": "flip-equivalent-binary-trees", "950": "reveal-cards-in-increasing-order", "949": "largest-time-for-given-digits", "948": "bag-of-tokens", "947": "most-stones-removed-with-same-row-or-column", "946": "validate-stack-sequences", "945": "minimum-increment-to-make-array-unique", "944": "delete-columns-to-make-sorted", "943": "find-the-shortest-superstring", "942": "di-string-match", "941": "valid-mountain-array", "940": "distinct-subsequences-ii", "939": "minimum-area-rectangle", "938": "range-sum-of-bst", "937": "reorder-log-files", "936": "stamping-the-sequence", "935": "knight-dialer", "934": "shortest-bridge", "933": "number-of-recent-calls", "932": "beautiful-array", "931": "minimum-falling-path-sum", "930": "binary-subarrays-with-sum", "929": "unique-email-addresses", "928": "minimize-malware-spread-ii", "927": "three-equal-parts", "926": "flip-string-to-monotone-increasing", "925": "long-pressed-name", "924": "minimize-malware-spread", "923": "3sum-with-multiplicity", "922": "sort-array-by-parity-ii", "921": "minimum-add-to-make-parentheses-valid", "920": "number-of-music-playlists", "919": "complete-binary-tree-inserter", "918": "maximum-sum-circular-subarray", "917": "reverse-only-letters", "916": "word-subsets", "915": "partition-array-into-disjoint-intervals", "914": "x-of-a-kind-in-a-deck-of-cards", "913": "cat-and-mouse", "911": "online-election", "910": "smallest-range-ii", "909": "snakes-and-ladders", "908": "smallest-range-i", "907": "sum-of-subarray-minimums", "906": "super-palindromes", "905": "sort-array-by-parity", "904": "fruit-into-baskets", "903": "valid-permutations-for-di-sequence", "902": "numbers-at-most-n-given-digit-set", "901": "online-stock-span", "900": "rle-iterator", "899": "orderly-queue", "898": "bitwise-ors-of-subarrays", "897": "increasing-order-search-tree", "896": "monotonic-array", "895": "maximum-frequency-stack", "894": "all-possible-full-binary-trees", "893": "groups-of-special-equivalent-strings", "892": "surface-area-of-3d-shapes", "891": "sum-of-subsequence-widths", "890": "find-and-replace-pattern", "889": "construct-binary-tree-from-preorder-and-postorder-traversal", "888": "fair-candy-swap", "887": "super-egg-drop", "886": "possible-bipartition", "885": "spiral-matrix-iii", "884": "uncommon-words-from-two-sentences", "883": "projection-area-of-3d-shapes", "882": "reachable-nodes-in-subdivided-graph", "881": "boats-to-save-people", "880": "decoded-string-at-index", "478": "generate-random-point-in-a-circle", "497": "random-point-in-non-overlapping-rectangles", "519": "random-flip-matrix", "528": "random-pick-with-weight", "879": "profitable-schemes", "878": "nth-magical-number", "877": "stone-game", "876": "middle-of-the-linked-list", "875": "koko-eating-bananas", "874": "walking-robot-simulation", "873": "length-of-longest-fibonacci-subsequence", "872": "leaf-similar-trees", "470": "implement-rand10-using-rand7", "871": "minimum-number-of-refueling-stops", "870": "advantage-shuffle", "869": "reordered-power-of-2", "868": "binary-gap", "867": "transpose-matrix", "866": "prime-palindrome", "865": "smallest-subtree-with-all-the-deepest-nodes", "864": "shortest-path-to-get-all-keys", "710": "random-pick-with-blacklist", "863": "all-nodes-distance-k-in-binary-tree", "862": "shortest-subarray-with-sum-at-least-k", "861": "score-after-flipping-matrix", "860": "lemonade-change", "859": "buddy-strings", "858": "mirror-reflection", "857": "minimum-cost-to-hire-k-workers", "856": "score-of-parentheses", "855": "exam-room", "854": "k-similar-strings", "853": "car-fleet", "852": "peak-index-in-a-mountain-array", "851": "loud-and-rich", "850": "rectangle-area-ii", "849": "maximize-distance-to-closest-person", "848": "shifting-letters", "847": "shortest-path-visiting-all-nodes", "846": "hand-of-straights", "845": "longest-mountain-in-array", "844": "backspace-string-compare", "843": "guess-the-word", "842": "split-array-into-fibonacci-sequence", "841": "keys-and-rooms", "840": "magic-squares-in-grid", "839": "similar-string-groups", "838": "push-dominoes", "837": "new-21-game", "836": "rectangle-overlap", "835": "image-overlap", "834": "sum-of-distances-in-tree", "833": "find-and-replace-in-string", "832": "flipping-an-image", "622": "design-circular-queue", "641": "design-circular-deque", "831": "masking-personal-information", "830": "positions-of-large-groups", "829": "consecutive-numbers-sum", "828": "unique-letter-string", "827": "making-a-large-island", "826": "most-profit-assigning-work", "825": "friends-of-appropriate-ages", "824": "goat-latin", "823": "binary-trees-with-factors", "822": "card-flipping-game", "821": "shortest-distance-to-a-character", "820": "short-encoding-of-words", "707": "design-linked-list", "819": "most-common-word", "818": "race-car", "817": "linked-list-components", "816": "ambiguous-coordinates", "815": "bus-routes", "814": "binary-tree-pruning", "813": "largest-sum-of-averages", "812": "largest-triangle-area", "811": "subdomain-visit-count", "810": "chalkboard-xor-game", "809": "expressive-words", "808": "soup-servings", "807": "max-increase-to-keep-city-skyline", "806": "number-of-lines-to-write-string", "805": "split-array-with-same-average", "804": "unique-morse-code-words", "803": "bricks-falling-when-hit", "802": "find-eventual-safe-states", "801": "minimum-swaps-to-make-sequences-increasing", "706": "design-hashmap", "705": "design-hashset", "799": "champagne-tower", "798": "smallest-rotation-with-highest-score", "797": "all-paths-from-source-to-target", "796": "rotate-string", "795": "number-of-subarrays-with-bounded-maximum", "794": "valid-tic-tac-toe-state", "793": "preimage-size-of-factorial-zeroes-function", "792": "number-of-matching-subsequences", "791": "custom-sort-string", "790": "domino-and-tromino-tiling", "789": "escape-the-ghosts", "788": "rotated-digits", "787": "cheapest-flights-within-k-stops", "786": "k-th-smallest-prime-fraction", "785": "is-graph-bipartite", "784": "letter-case-permutation", "783": "minimum-distance-between-bst-nodes", "782": "transform-to-chessboard", "781": "rabbits-in-forest", "780": "reaching-points", "779": "k-th-symbol-in-grammar", "778": "swim-in-rising-water", "777": "swap-adjacent-in-lr-string", "704": "binary-search", "775": "global-and-local-inversions", "703": "kth-largest-element-in-a-stream", "773": "sliding-puzzle", "701": "insert-into-a-binary-search-tree", "700": "search-in-a-binary-search-tree", "771": "jewels-and-stones", "770": "basic-calculator-iv", "769": "max-chunks-to-make-sorted", "768": "max-chunks-to-make-sorted-ii", "767": "reorganize-string", "766": "toeplitz-matrix", "590": "n-ary-tree-postorder-traversal", "589": "n-ary-tree-preorder-traversal", "559": "maximum-depth-of-n-ary-tree", "558": "quad-tree-intersection", "427": "construct-quad-tree", "765": "couples-holding-hands", "764": "largest-plus-sign", "763": "partition-labels", "762": "prime-number-of-set-bits-in-binary-representation", "430": "flatten-a-multilevel-doubly-linked-list", "429": "n-ary-tree-level-order-traversal", "761": "special-binary-string", "757": "set-intersection-size-at-least-two", "756": "pyramid-transition-matrix", "754": "reach-a-number", "753": "cracking-the-safe", "752": "open-the-lock", "749": "contain-virus", "748": "shortest-completing-word", "747": "largest-number-at-least-twice-of-others", "746": "min-cost-climbing-stairs", "745": "prefix-and-suffix-search", "744": "find-smallest-letter-greater-than-target", "743": "network-delay-time", "709": "to-lower-case", "741": "cherry-pickup", "740": "delete-and-earn", "739": "daily-temperatures", "738": "monotone-increasing-digits", "736": "parse-lisp-expression", "735": "asteroid-collision", "733": "flood-fill", "732": "my-calendar-iii", "731": "my-calendar-ii", "730": "count-different-palindromic-subsequences", "729": "my-calendar-i", "728": "self-dividing-numbers", "726": "number-of-atoms", "725": "split-linked-list-in-parts", "724": "find-pivot-index", "722": "remove-comments", "721": "accounts-merge", "720": "longest-word-in-dictionary", "719": "find-k-th-smallest-pair-distance", "718": "maximum-length-of-repeated-subarray", "717": "1-bit-and-2-bit-characters", "715": "range-module", "714": "best-time-to-buy-and-sell-stock-with-transaction-fee", "713": "subarray-product-less-than-k", "712": "minimum-ascii-delete-sum-for-two-strings", "699": "falling-squares", "698": "partition-to-k-equal-sum-subsets", "697": "degree-of-an-array", "696": "count-binary-substrings", "695": "max-area-of-island", "693": "binary-number-with-alternating-bits", "692": "top-k-frequent-words", "691": "stickers-to-spell-word", "690": "employee-importance", "689": "maximum-sum-of-3-non-overlapping-subarrays", "688": "knight-probability-in-chessboard", "687": "longest-univalue-path", "686": "repeated-string-match", "685": "redundant-connection-ii", "684": "redundant-connection", "682": "baseball-game", "680": "valid-palindrome-ii", "679": "24-game", "678": "valid-parenthesis-string", "677": "map-sum-pairs", "676": "implement-magic-dictionary", "675": "cut-off-trees-for-golf-event", "674": "longest-continuous-increasing-subsequence", "673": "number-of-longest-increasing-subsequence", "672": "bulb-switcher-ii", "671": "second-minimum-node-in-a-binary-tree", "670": "maximum-swap", "669": "trim-a-binary-search-tree", "668": "kth-smallest-number-in-multiplication-table", "667": "beautiful-arrangement-ii", "665": "non-decreasing-array", "664": "strange-printer", "662": "maximum-width-of-binary-tree", "661": "image-smoother", "659": "split-array-into-consecutive-subsequences", "658": "find-k-closest-elements", "657": "robot-return-to-origin", "655": "print-binary-tree", "654": "maximum-binary-tree", "653": "two-sum-iv-input-is-a-bst", "652": "find-duplicate-subtrees", "650": "2-keys-keyboard", "649": "dota2-senate", "648": "replace-words", "647": "palindromic-substrings", "646": "maximum-length-of-pair-chain", "645": "set-mismatch", "643": "maximum-average-subarray-i", "640": "solve-the-equation", "639": "decode-ways-ii", "638": "shopping-offers", "637": "average-of-levels-in-binary-tree", "636": "exclusive-time-of-functions", "633": "sum-of-square-numbers", "632": "smallest-range", "630": "course-schedule-iii", "629": "k-inverse-pairs-array", "628": "maximum-product-of-three-numbers", "627": "swap-salary", "626": "exchange-seats", "623": "add-one-row-to-tree", "621": "task-scheduler", "620": "not-boring-movies", "617": "merge-two-binary-trees", "611": "valid-triangle-number", "609": "find-duplicate-file-in-system", "606": "construct-string-from-binary-tree", "605": "can-place-flowers", "601": "human-traffic-of-stadium", "600": "non-negative-integers-without-consecutive-ones", "599": "minimum-index-sum-of-two-lists", "598": "range-addition-ii", "596": "classes-more-than-5-students", "595": "big-countries", "594": "longest-harmonious-subsequence", "593": "valid-square", "592": "fraction-addition-and-subtraction", "591": "tag-validator", "587": "erect-the-fence", "583": "delete-operation-for-two-strings", "581": "shortest-unsorted-continuous-subarray", "576": "out-of-boundary-paths", "575": "distribute-candies", "572": "subtree-of-another-tree", "567": "permutation-in-string", "566": "reshape-the-matrix", "565": "array-nesting", "564": "find-the-closest-palindrome", "563": "binary-tree-tilt", "561": "array-partition-i", "560": "subarray-sum-equals-k", "557": "reverse-words-in-a-string-iii", "556": "next-greater-element-iii", "554": "brick-wall", "553": "optimal-division", "552": "student-attendance-record-ii", "551": "student-attendance-record-i", "547": "friend-circles", "546": "remove-boxes", "543": "diameter-of-binary-tree", "542": "01-matrix", "541": "reverse-string-ii", "540": "single-element-in-a-sorted-array", "539": "minimum-time-difference", "538": "convert-bst-to-greater-tree", "537": "complex-number-multiplication", "535": "encode-and-decode-tinyurl", "532": "k-diff-pairs-in-an-array", "530": "minimum-absolute-difference-in-bst", "529": "minesweeper", "526": "beautiful-arrangement", "525": "contiguous-array", "524": "longest-word-in-dictionary-through-deleting", "523": "continuous-subarray-sum", "522": "longest-uncommon-subsequence-ii", "521": "longest-uncommon-subsequence-i", "520": "detect-capital", "518": "coin-change-2", "517": "super-washing-machines", "516": "longest-palindromic-subsequence", "515": "find-largest-value-in-each-tree-row", "514": "freedom-trail", "513": "find-bottom-left-tree-value", "508": "most-frequent-subtree-sum", "507": "perfect-number", "506": "relative-ranks", "504": "base-7", "503": "next-greater-element-ii", "502": "ipo", "501": "find-mode-in-binary-search-tree", "500": "keyboard-row", "498": "diagonal-traverse", "496": "next-greater-element-i", "495": "teemo-attacking", "494": "target-sum", "493": "reverse-pairs", "492": "construct-the-rectangle", "491": "increasing-subsequences", "488": "zuma-game", "486": "predict-the-winner", "485": "max-consecutive-ones", "483": "smallest-good-base", "482": "license-key-formatting", "481": "magical-string", "480": "sliding-window-median", "479": "largest-palindrome-product", "477": "total-hamming-distance", "476": "number-complement", "475": "heaters", "474": "ones-and-zeroes", "473": "matchsticks-to-square", "472": "concatenated-words", "468": "validate-ip-address", "467": "unique-substrings-in-wraparound-string", "466": "count-the-repetitions", "464": "can-i-win", "463": "island-perimeter", "462": "minimum-moves-to-equal-array-elements-ii", "461": "hamming-distance", "460": "lfu-cache", "459": "repeated-substring-pattern", "458": "poor-pigs", "457": "circular-array-loop", "456": "132-pattern", "455": "assign-cookies", "454": "4sum-ii", "453": "minimum-moves-to-equal-array-elements", "452": "minimum-number-of-arrows-to-burst-balloons", "451": "sort-characters-by-frequency", "450": "delete-node-in-a-bst", "449": "serialize-and-deserialize-bst", "448": "find-all-numbers-disappeared-in-an-array", "447": "number-of-boomerangs", "446": "arithmetic-slices-ii-subsequence", "445": "add-two-numbers-ii", "443": "string-compression", "442": "find-all-duplicates-in-an-array", "441": "arranging-coins", "440": "k-th-smallest-in-lexicographical-order", "438": "find-all-anagrams-in-a-string", "437": "path-sum-iii", "436": "find-right-interval", "435": "non-overlapping-intervals", "434": "number-of-segments-in-a-string", "433": "minimum-genetic-mutation", "432": "all-oone-data-structure", "424": "longest-repeating-character-replacement", "423": "reconstruct-original-digits-from-english", "421": "maximum-xor-of-two-numbers-in-an-array", "420": "strong-password-checker", "419": "battleships-in-a-board", "417": "pacific-atlantic-water-flow", "416": "partition-equal-subset-sum", "415": "add-strings", "414": "third-maximum-number", "413": "arithmetic-slices", "412": "fizz-buzz", "410": "split-array-largest-sum", "409": "longest-palindrome", "407": "trapping-rain-water-ii", "406": "queue-reconstruction-by-height", "405": "convert-a-number-to-hexadecimal", "404": "sum-of-left-leaves", "403": "frog-jump", "402": "remove-k-digits", "401": "binary-watch", "400": "nth-digit", "399": "evaluate-division", "398": "random-pick-index", "397": "integer-replacement", "396": "rotate-function", "395": "longest-substring-with-at-least-k-repeating-characters", "394": "decode-string", "393": "utf-8-validation", "392": "is-subsequence", "391": "perfect-rectangle", "390": "elimination-game", "389": "find-the-difference", "388": "longest-absolute-file-path", "387": "first-unique-character-in-a-string", "386": "lexicographical-numbers", "385": "mini-parser", "384": "shuffle-an-array", "383": "ransom-note", "382": "linked-list-random-node", "381": "insert-delete-getrandom-o1-duplicates-allowed", "380": "insert-delete-getrandom-o1", "378": "kth-smallest-element-in-a-sorted-matrix", "377": "combination-sum-iv", "376": "wiggle-subsequence", "375": "guess-number-higher-or-lower-ii", "374": "guess-number-higher-or-lower", "373": "find-k-pairs-with-smallest-sums", "372": "super-pow", "371": "sum-of-two-integers", "368": "largest-divisible-subset", "367": "valid-perfect-square", "365": "water-and-jug-problem", "363": "max-sum-of-rectangle-no-larger-than-k", "357": "count-numbers-with-unique-digits", "355": "design-twitter", "354": "russian-doll-envelopes", "352": "data-stream-as-disjoint-intervals", "350": "intersection-of-two-arrays-ii", "349": "intersection-of-two-arrays", "347": "top-k-frequent-elements", "345": "reverse-vowels-of-a-string", "344": "reverse-string", "343": "integer-break", "342": "power-of-four", "341": "flatten-nested-list-iterator", "338": "counting-bits", "337": "house-robber-iii", "336": "palindrome-pairs", "335": "self-crossing", "334": "increasing-triplet-subsequence", "332": "reconstruct-itinerary", "331": "verify-preorder-serialization-of-a-binary-tree", "330": "patching-array", "329": "longest-increasing-path-in-a-matrix", "328": "odd-even-linked-list", "327": "count-of-range-sum", "326": "power-of-three", "324": "wiggle-sort-ii", "322": "coin-change", "321": "create-maximum-number", "319": "bulb-switcher", "318": "maximum-product-of-word-lengths", "316": "remove-duplicate-letters", "315": "count-of-smaller-numbers-after-self", "313": "super-ugly-number", "312": "burst-balloons", "310": "minimum-height-trees", "309": "best-time-to-buy-and-sell-stock-with-cooldown", "307": "range-sum-query-mutable", "306": "additive-number", "304": "range-sum-query-2d-immutable", "303": "range-sum-query-immutable", "301": "remove-invalid-parentheses", "300": "longest-increasing-subsequence", "299": "bulls-and-cows", "297": "serialize-and-deserialize-binary-tree", "295": "find-median-from-data-stream", "292": "nim-game", "290": "word-pattern", "289": "game-of-life", "287": "find-the-duplicate-number", "284": "peeking-iterator", "283": "move-zeroes", "282": "expression-add-operators", "279": "perfect-squares", "278": "first-bad-version", "275": "h-index-ii", "274": "h-index", "273": "integer-to-english-words", "268": "missing-number", "264": "ugly-number-ii", "263": "ugly-number", "262": "trips-and-users", "260": "single-number-iii", "258": "add-digits", "257": "binary-tree-paths", "242": "valid-anagram", "241": "different-ways-to-add-parentheses", "240": "search-a-2d-matrix-ii", "239": "sliding-window-maximum", "238": "product-of-array-except-self", "237": "delete-node-in-a-linked-list", "236": "lowest-common-ancestor-of-a-binary-tree", "235": "lowest-common-ancestor-of-a-binary-search-tree", "234": "palindrome-linked-list", "233": "number-of-digit-one", "232": "implement-queue-using-stacks", "231": "power-of-two", "230": "kth-smallest-element-in-a-bst", "229": "majority-element-ii", "228": "summary-ranges", "227": "basic-calculator-ii", "226": "invert-binary-tree", "225": "implement-stack-using-queues", "224": "basic-calculator", "223": "rectangle-area", "222": "count-complete-tree-nodes", "221": "maximal-square", "220": "contains-duplicate-iii", "219": "contains-duplicate-ii", "218": "the-skyline-problem", "217": "contains-duplicate", "216": "combination-sum-iii", "215": "kth-largest-element-in-an-array", "214": "shortest-palindrome", "213": "house-robber-ii", "212": "word-search-ii", "211": "add-and-search-word-data-structure-design", "210": "course-schedule-ii", "209": "minimum-size-subarray-sum", "208": "implement-trie-prefix-tree", "207": "course-schedule", "206": "reverse-linked-list", "205": "isomorphic-strings", "204": "count-primes", "203": "remove-linked-list-elements", "202": "happy-number", "201": "bitwise-and-of-numbers-range", "200": "number-of-islands", "199": "binary-tree-right-side-view", "198": "house-robber", "197": "rising-temperature", "196": "delete-duplicate-emails", "195": "tenth-line", "194": "transpose-file", "193": "valid-phone-numbers", "192": "word-frequency", "191": "number-of-1-bits", "190": "reverse-bits", "189": "rotate-array", "188": "best-time-to-buy-and-sell-stock-iv", "187": "repeated-dna-sequences", "185": "department-top-three-salaries", "184": "department-highest-salary", "183": "customers-who-never-order", "182": "duplicate-emails", "181": "employees-earning-more-than-their-managers", "180": "consecutive-numbers", "179": "largest-number", "178": "rank-scores", "177": "nth-highest-salary", "176": "second-highest-salary", "175": "combine-two-tables", "174": "dungeon-game", "173": "binary-search-tree-iterator", "172": "factorial-trailing-zeroes", "171": "excel-sheet-column-number", "169": "majority-element", "168": "excel-sheet-column-title", "167": "two-sum-ii-input-array-is-sorted", "166": "fraction-to-recurring-decimal", "165": "compare-version-numbers", "164": "maximum-gap", "162": "find-peak-element", "160": "intersection-of-two-linked-lists", "155": "min-stack", "154": "find-minimum-in-rotated-sorted-array-ii", "153": "find-minimum-in-rotated-sorted-array", "152": "maximum-product-subarray", "151": "reverse-words-in-a-string", "150": "evaluate-reverse-polish-notation", "149": "max-points-on-a-line", "148": "sort-list", "147": "insertion-sort-list", "146": "lru-cache", "145": "binary-tree-postorder-traversal", "144": "binary-tree-preorder-traversal", "143": "reorder-list", "142": "linked-list-cycle-ii", "141": "linked-list-cycle", "140": "word-break-ii", "139": "word-break", "138": "copy-list-with-random-pointer", "137": "single-number-ii", "136": "single-number", "135": "candy", "134": "gas-station", "133": "clone-graph", "132": "palindrome-partitioning-ii", "131": "palindrome-partitioning", "130": "surrounded-regions", "129": "sum-root-to-leaf-numbers", "128": "longest-consecutive-sequence", "127": "word-ladder", "126": "word-ladder-ii", "125": "valid-palindrome", "124": "binary-tree-maximum-path-sum", "123": "best-time-to-buy-and-sell-stock-iii", "122": "best-time-to-buy-and-sell-stock-ii", "121": "best-time-to-buy-and-sell-stock", "120": "triangle", "119": "pascals-triangle-ii", "118": "pascals-triangle", "117": "populating-next-right-pointers-in-each-node-ii", "116": "populating-next-right-pointers-in-each-node", "115": "distinct-subsequences", "114": "flatten-binary-tree-to-linked-list", "113": "path-sum-ii", "112": "path-sum", "111": "minimum-depth-of-binary-tree", "110": "balanced-binary-tree", "109": "convert-sorted-list-to-binary-search-tree", "108": "convert-sorted-array-to-binary-search-tree", "107": "binary-tree-level-order-traversal-ii", "106": "construct-binary-tree-from-inorder-and-postorder-traversal", "105": "construct-binary-tree-from-preorder-and-inorder-traversal", "104": "maximum-depth-of-binary-tree", "103": "binary-tree-zigzag-level-order-traversal", "102": "binary-tree-level-order-traversal", "101": "symmetric-tree", "100": "same-tree", "99": "recover-binary-search-tree", "98": "validate-binary-search-tree", "97": "interleaving-string", "96": "unique-binary-search-trees", "95": "unique-binary-search-trees-ii", "94": "binary-tree-inorder-traversal", "93": "restore-ip-addresses", "92": "reverse-linked-list-ii", "91": "decode-ways", "90": "subsets-ii", "89": "gray-code", "88": "merge-sorted-array", "87": "scramble-string", "86": "partition-list", "85": "maximal-rectangle", "84": "largest-rectangle-in-histogram", "83": "remove-duplicates-from-sorted-list", "82": "remove-duplicates-from-sorted-list-ii", "81": "search-in-rotated-sorted-array-ii", "80": "remove-duplicates-from-sorted-array-ii", "79": "word-search", "78": "subsets", "77": "combinations", "76": "minimum-window-substring", "75": "sort-colors", "74": "search-a-2d-matrix", "73": "set-matrix-zeroes", "72": "edit-distance", "71": "simplify-path", "70": "climbing-stairs", "69": "sqrtx", "68": "text-justification", "67": "add-binary", "66": "plus-one", "65": "valid-number", "64": "minimum-path-sum", "63": "unique-paths-ii", "62": "unique-paths", "61": "rotate-list", "60": "permutation-sequence", "59": "spiral-matrix-ii", "58": "length-of-last-word", "57": "insert-interval", "56": "merge-intervals", "55": "jump-game", "54": "spiral-matrix", "53": "maximum-subarray", "52": "n-queens-ii", "51": "n-queens", "50": "powx-n", "49": "group-anagrams", "48": "rotate-image", "47": "permutations-ii", "46": "permutations", "45": "jump-game-ii", "44": "wildcard-matching", "43": "multiply-strings", "42": "trapping-rain-water", "41": "first-missing-positive", "40": "combination-sum-ii", "39": "combination-sum", "38": "count-and-say", "37": "sudoku-solver", "36": "valid-sudoku", "35": "search-insert-position", "34": "find-first-and-last-position-of-element-in-sorted-array", "33": "search-in-rotated-sorted-array", "32": "longest-valid-parentheses", "31": "next-permutation", "30": "substring-with-concatenation-of-all-words", "29": "divide-two-integers", "28": "implement-strstr", "27": "remove-element", "26": "remove-duplicates-from-sorted-array", "25": "reverse-nodes-in-k-group", "24": "swap-nodes-in-pairs", "23": "merge-k-sorted-lists", "22": "generate-parentheses", "21": "merge-two-sorted-lists", "20": "valid-parentheses", "19": "remove-nth-node-from-end-of-list", "18": "4sum", "17": "letter-combinations-of-a-phone-number", "16": "3sum-closest", "15": "3sum", "14": "longest-common-prefix", "13": "roman-to-integer", "12": "integer-to-roman", "11": "container-with-most-water", "10": "regular-expression-matching", "9": "palindrome-number", "8": "string-to-integer-atoi", "7": "reverse-integer", "6": "zigzag-conversion", "5": "longest-palindromic-substring", "4": "median-of-two-sorted-arrays", "3": "longest-substring-without-repeating-characters", "2": "add-two-numbers", "1": "two-sum"}
const lintcode_slug = {"1": "a-b-problem", "2": "trailing-zeros", "3": "digit-counts", "4": "ugly-number-ii", "5": "kth-largest-element", "6": "merge-two-sorted-arrays", "7": "serialize-and-deserialize-binary-tree", "8": "rotate-string", "9": "fizz-buzz", "10": "string-permutation-ii", "11": "search-range-in-binary-search-tree", "12": "min-stack", "13": "implement-strstr", "14": "first-position-of-target", "15": "permutations", "16": "permutations-ii", "17": "subsets", "18": "subsets-ii", "20": "dices-sum", "22": "flatten-list", "24": "lfu-cache", "28": "search-a-2d-matrix", "29": "interleaving-string", "30": "insert-interval", "31": "partition-array", "32": "minimum-window-substring", "33": "n-queens", "34": "n-queens-ii", "35": "reverse-linked-list", "36": "reverse-linked-list-ii", "37": "reverse-3-digit-integer", "38": "search-a-2d-matrix-ii", "39": "recover-rotated-sorted-array", "40": "implement-queue-by-two-stacks", "41": "maximum-subarray", "42": "maximum-subarray-ii", "43": "maximum-subarray-iii", "44": "minimum-subarray", "45": "maximum-subarray-difference", "46": "majority-element", "47": "majority-element-ii", "48": "majority-number-iii", "49": "sort-letters-by-case", "50": "product-of-array-exclude-itself", "51": "previous-permutation", "52": "next-permutation", "53": "reverse-words-in-a-string", "54": "string-to-integer-atoi", "55": "compare-strings", "56": "two-sum", "57": "3sum", "58": "4sum", "59": "3sum-closest", "60": "search-insert-position", "61": "search-for-a-range", "62": "search-in-rotated-sorted-array", "63": "search-in-rotated-sorted-array-ii", "64": "merge-sorted-array", "65": "median-of-two-sorted-arrays", "66": "binary-tree-preorder-traversal", "67": "binary-tree-inorder-traversal", "68": "binary-tree-postorder-traversal", "69": "binary-tree-level-order-traversal", "70": "binary-tree-level-order-traversal-ii", "71": "binary-tree-zigzag-level-order-traversal", "72": "construct-binary-tree-from-inorder-and-postorder-traversal", "73": "construct-binary-tree-from-preorder-and-inorder-traversal", "74": "first-bad-version", "75": "find-peak-element", "76": "longest-increasing-subsequence", "77": "longest-common-subsequence", "78": "longest-common-prefix", "79": "longest-common-substring", "80": "median", "81": "find-median-from-data-stream", "82": "single-number", "83": "single-number-ii", "84": "single-number-iii", "85": "insert-node-in-a-binary-search-tree", "86": "binary-search-tree-iterator", "87": "remove-node-in-binary-search-tree", "88": "lowest-common-ancestor-of-a-binary-tree", "89": "k-sum", "90": "k-sum-ii", "91": "minimum-adjustment-cost", "92": "backpack", "93": "balanced-binary-tree", "94": "binary-tree-maximum-path-sum", "95": "validate-binary-search-tree", "96": "partition-list", "97": "maximum-depth-of-binary-tree", "98": "sort-list", "99": "reorder-list", "100": "remove-duplicates-from-sorted-array", "101": "remove-duplicates-from-sorted-array-ii", "102": "linked-list-cycle", "103": "linked-list-cycle-ii", "104": "merge-k-sorted-lists", "105": "copy-list-with-random-pointer", "106": "convert-sorted-list-to-binary-search-tree", "107": "word-break", "108": "palindrome-partitioning-ii", "109": "triangle", "110": "minimum-path-sum", "111": "climbing-stairs", "112": "remove-duplicates-from-sorted-list", "113": "remove-duplicates-from-sorted-list-ii", "114": "unique-paths", "115": "unique-paths-ii", "116": "jump-game", "117": "jump-game-ii", "118": "distinct-subsequences", "119": "edit-distance", "120": "word-ladder", "121": "word-ladder-ii", "122": "largest-rectangle-in-histogram", "123": "word-search", "124": "longest-consecutive-sequence", "125": "backpack-ii", "126": "max-tree", "127": "topological-sorting", "128": "hash-function", "129": "rehashing", "130": "heapify", "131": "the-skyline-problem", "132": "word-search-ii", "133": "longest-word", "134": "lru-cache", "135": "combination-sum", "136": "palindrome-partitioning", "137": "clone-graph", "138": "subarray-sum", "139": "subarray-sum-closest", "140": "fast-power", "141": "sqrtx", "142": "o1-check-power-of-2", "143": "sort-colors-ii", "144": "interleaving-positive-and-negative-numbers", "145": "lowercase-to-uppercase", "146": "lowercase-to-uppercase-ii", "147": "narcissistic-number", "148": "sort-colors", "149": "best-time-to-buy-and-sell-stock", "150": "best-time-to-buy-and-sell-stock-ii", "151": "best-time-to-buy-and-sell-stock-iii", "152": "combinations", "153": "combination-sum-ii", "154": "regular-expression-matching", "155": "minimum-depth-of-binary-tree", "156": "merge-intervals", "157": "unique-characters", "158": "valid-anagram", "159": "find-minimum-in-rotated-sorted-array", "160": "find-minimum-in-rotated-sorted-array-ii", "161": "rotate-image", "162": "set-matrix-zeroes", "163": "unique-binary-search-trees", "164": "unique-binary-search-trees-ii", "165": "merge-two-sorted-lists", "166": "nth-to-last-node-in-list", "167": "add-two-numbers", "168": "burst-balloons", "169": "tower-of-hanoi", "170": "rotate-list", "171": "anagrams", "172": "remove-element", "173": "insertion-sort-list", "174": "remove-nth-node-from-end-of-list", "175": "invert-binary-tree", "176": "route-between-two-nodes-in-graph", "177": "convert-sorted-array-to-binary-search-tree-with-minimal-height", "178": "graph-valid-tree", "179": "update-bits", "180": "binary-representation", "181": "flip-bits", "182": "delete-digits", "183": "wood-cut", "184": "largest-number", "185": "matrix-zigzag-traversal", "186": "max-points-on-a-line", "187": "gas-station", "189": "first-missing-positive", "190": "next-permutation-ii", "191": "maximum-product-subarray", "192": "wildcard-matching", "196": "missing-number", "197": "permutation-index", "198": "permutation-index-ii", "200": "longest-palindromic-substring", "201": "segment-tree-build", "202": "segment-tree-query", "203": "segment-tree-modify", "204": "singleton", "205": "interval-minimum-number", "206": "interval-sum", "207": "interval-sum-ii", "208": "assignment-operator-overloading-c-only", "209": "first-unique-character-in-a-string", "210": "null-terminated-string", "211": "string-permutation", "212": "space-replacement", "213": "string-compression", "214": "max-of-array", "215": "rate-limiter", "216": "substring-rotation", "217": "remove-duplicates-from-unsorted-list", "218": "student-level", "219": "insert-node-in-sorted-linked-list", "221": "add-two-numbers-ii", "222": "setter-and-getter", "223": "palindrome-linked-list", "224": "implement-three-stacks-by-single-array", "225": "find-node-in-linked-list", "226": "set-of-stacks-ii", "227": "mock-hanoi-tower-by-stacks", "228": "middle-of-linked-list", "229": "stack-sorting", "230": "animal-shelter", "231": "typeahead", "232": "tiny-url", "233": "next-smaller-and-larger-number-with-the-same-1-bits", "234": "webpage-crawler", "235": "prime-factorization", "236": "swap-bits", "237": "missing-integer", "238": "monochrome-screen", "239": "root-of-equation", "241": "string-to-integer", "242": "convert-binary-tree-to-linked-lists-by-depth", "243": "amicable-pair", "245": "subtree", "246": "binary-tree-path-sum-ii", "247": "segment-tree-query-ii", "248": "count-of-smaller-number", "249": "count-of-smaller-number-before-itself", "254": "drop-eggs", "272": "climbing-stairs-ii", "279": "number-of-ways-to-represent-n-cents", "283": "max-of-3-numbers", "360": "sliding-window-median", "362": "sliding-window-maximum", "363": "trapping-rain-water", "364": "trapping-rain-water-ii", "365": "count-1-in-binary", "366": "fibonacci", "367": "expression-tree-build", "368": "expression-evaluation", "369": "convert-expression-to-polish-notation", "370": "convert-expression-to-reverse-polish-notation", "371": "print-numbers-by-recursion", "372": "delete-node-in-a-linked-list", "373": "partition-array-by-odd-and-even", "374": "spiral-matrix", "375": "clone-binary-tree", "376": "binary-tree-path-sum", "378": "convert-binary-search-tree-to-doubly-linked-list", "379": "reorder-array-to-construct-the-minimum-number", "380": "intersection-of-two-linked-lists", "381": "spiral-matrix-ii", "382": "triangle-count", "383": "container-with-most-water", "384": "longest-substring-without-repeating-characters", "385": "arraylist", "386": "longest-substring-with-at-most-k-distinct-characters", "387": "the-smallest-difference", "388": "permutation-sequence", "389": "valid-sudoku", "390": "find-peak-element-ii", "391": "number-of-airplanes-in-the-sky", "392": "house-robber", "393": "best-time-to-buy-and-sell-stock-iv", "394": "coins-in-a-line", "395": "coins-in-a-line-ii", "396": "coins-in-a-line-iii", "397": "longest-continuous-increasing-subsequence", "398": "longest-continuous-increasing-subsequence-ii", "399": "nuts-bolts-problem", "400": "maximum-gap", "401": "kth-smallest-number-in-sorted-matrix", "402": "continuous-subarray-sum", "403": "continuous-subarray-sum-ii", "404": "subarray-sum-ii", "405": "submatrix-sum", "406": "minimum-size-subarray-sum", "407": "plus-one", "408": "add-binary", "411": "gray-code", "412": "candy", "413": "reverse-integer", "414": "divide-two-integers", "415": "valid-palindrome", "417": "valid-number", "418": "integer-to-roman", "419": "roman-to-integer", "420": "count-and-say", "421": "simplify-path", "422": "length-of-last-word", "423": "valid-parentheses", "424": "evaluate-reverse-polish-notation", "425": "letter-combinations-of-a-phone-number", "426": "restore-ip-addresses", "427": "generate-parentheses", "428": "powx-n", "430": "scramble-string", "431": "connected-component-in-undirected-graph", "432": "find-the-weak-connected-component-in-the-directed-graph", "433": "number-of-islands", "434": "number-of-islands-ii", "435": "post-office-problem", "436": "maximal-square", "437": "copy-books", "438": "copy-books-ii", "439": "segment-tree-build-ii", "440": "backpack-iii", "442": "implement-trie-prefix-tree", "443": "two-sum-greater-than-target", "445": "cosine-similarity", "447": "search-in-a-big-sorted-array", "448": "inorder-successor-in-bst", "449": "char-to-integer", "450": "reverse-nodes-in-k-group", "451": "swap-nodes-in-pairs", "452": "remove-linked-list-elements", "453": "flatten-binary-tree-to-linked-list", "454": "rectangle-area", "455": "student-id", "456": "reference", "457": "classical-binary-search", "458": "last-position-of-target", "459": "closest-number-in-sorted-array", "460": "find-k-closest-elements", "461": "kth-smallest-numbers-in-unsorted-array", "462": "total-occurrence-of-target", "463": "sort-integers", "464": "sort-integers-ii", "465": "kth-smallest-sum-in-two-sorted-arrays", "466": "count-linked-list-nodes", "467": "complete-binary-tree", "468": "symmetric-binary-tree", "469": "same-tree", "470": "tweaked-identical-binary-tree", "471": "top-k-frequent-words", "472": "binary-tree-path-sum-iii", "473": "add-and-search-word-data-structure-design", "474": "lowest-common-ancestor-ii", "475": "binary-tree-maximum-path-sum-ii", "476": "stone-game", "477": "surrounded-regions", "478": "simple-calculator", "479": "second-max-of-array", "480": "binary-tree-paths", "481": "binary-tree-leaf-sum", "482": "binary-tree-level-sum", "483": "convert-linked-list-to-array-list", "484": "swap-two-integers-in-array", "485": "generate-arraylist-with-given-size", "486": "merge-k-sorted-arrays", "487": "name-deduplication", "488": "happy-number", "489": "convert-array-list-to-linked-list", "490": "set-of-stacks", "491": "palindrome-number", "492": "implement-queue-by-linked-list", "493": "implement-queue-by-linked-list-ii", "494": "implement-stack-by-two-queues", "495": "implement-stack", "496": "toy-factory", "497": "shape-factory", "498": "parking-lot", "499": "word-count-map-reduce", "500": "inverted-index", "501": "design-twitter", "502": "mini-cassandra", "503": "anagram-map-reduce", "504": "inverted-index-map-reduce", "505": "web-logger", "507": "wiggle-sort-ii", "508": "wiggle-sort", "509": "mini-yelp", "510": "maximal-rectangle", "511": "swap-two-nodes-in-linked-list", "512": "decode-ways", "513": "perfect-squares", "514": "paint-fence", "515": "paint-house", "516": "paint-house-ii", "517": "ugly-number", "518": "super-ugly-number", "519": "consistent-hashing", "520": "consistent-hashing-ii", "521": "remove-duplicate-numbers-in-array", "522": "tiny-url-ii", "523": "url-parser", "524": "left-pad", "525": "mini-uber", "526": "load-balancer", "527": "trie-serialization", "528": "flatten-nested-list-iterator", "529": "geohash", "530": "geohash-ii", "531": "six-degrees", "532": "reverse-pairs", "533": "two-sum-closest-to-target", "534": "house-robber-ii", "535": "house-robber-iii", "537": "n-gram-map-reduce", "538": "memcache", "539": "move-zeroes", "540": "zigzag-iterator", "541": "zigzag-iterator-ii", "543": "kth-largest-in-n-arrays", "544": "top-k-largest-numbers", "545": "top-k-largest-numbers-ii", "546": "implement-queue-by-interface", "547": "intersection-of-two-arrays", "548": "intersection-of-two-arrays-ii", "549": "top-k-frequent-words-map-reduce", "550": "top-k-frequent-words-ii", "551": "nested-list-weight-sum", "552": "create-maximum-number", "553": "bomb-enemy", "554": "sort-integers-map-reduce", "555": "counting-bloom-filter", "556": "standard-bloom-filter", "557": "count-characters", "558": "sliding-window-matrix-maximum", "559": "trie-service", "560": "friendship-service", "562": "backpack-iv", "563": "backpack-v", "564": "combination-sum-iv", "565": "heart-beat", "566": "gfs-client", "569": "add-digits", "570": "find-the-missing-number-ii", "573": "build-post-office-ii", "574": "build-post-office", "575": "decode-string", "577": "merge-k-sorted-interval-lists", "578": "lowest-common-ancestor-iii", "581": "longest-repeating-subsequence", "582": "word-break-ii", "584": "drop-eggs-ii", "585": "maximum-number-in-mountain-sequence", "586": "sqrtx-ii", "587": "two-sum-unique-pairs", "588": "partition-equal-subset-sum", "589": "connecting-graph", "590": "connecting-graph-ii", "591": "connecting-graph-iii", "593": "stone-game-ii", "594": "strstr-ii", "595": "binary-tree-longest-consecutive-sequence", "596": "minimum-subtree", "597": "subtree-with-maximum-average", "598": "zombie-in-matrix", "599": "insert-into-a-cyclic-sorted-list", "600": "smallest-rectangle-enclosing-black-pixels", "601": "flatten-2d-vector", "602": "russian-doll-envelopes", "603": "largest-divisible-subset", "604": "window-sum", "605": "sequence-reconstruction", "606": "kth-largest-element-ii", "607": "two-sum-iii-data-structure-design", "608": "two-sum-ii-input-array-is-sorted", "609": "two-sum-less-than-or-equal-to-target", "610": "two-sum-difference-equals-to-target", "611": "knight-shortest-path", "612": "k-closest-points", "613": "high-five", "614": "binary-tree-longest-consecutive-sequence-ii", "615": "course-schedule", "616": "course-schedule-ii", "617": "maximum-average-subarray-ii", "618": "search-graph-nodes", "619": "binary-tree-longest-consecutive-sequence-iii", "620": "maximum-subarray-iv", "621": "maximum-subarray-v", "622": "frog-jump", "623": "k-edit-distance", "624": "remove-substrings", "625": "partition-array-ii", "626": "rectangle-overlap", "627": "longest-palindrome", "628": "maximum-subtree", "629": "minimum-spanning-tree", "630": "knight-shortest-path-ii", "631": "maximal-square-ii", "632": "binary-tree-maximum-node", "633": "find-the-duplicate-number", "634": "word-squares", "635": "boggle-game", "636": "132-pattern", "637": "valid-word-abbreviation", "638": "isomorphic-strings", "639": "word-abbreviation", "640": "one-edit-distance", "641": "missing-ranges", "642": "moving-average-from-data-stream", "643": "longest-absolute-file-path", "644": "strobogrammatic-number", "645": "find-the-celebrity", "646": "first-position-unique-character", "647": "find-all-anagrams-in-a-string", "648": "unique-word-abbreviation", "649": "binary-tree-upside-down", "650": "find-leaves-of-binary-tree", "651": "binary-tree-vertical-order-traversal", "652": "factorization", "653": "expression-add-operators", "654": "sparse-matrix-multiplication", "655": "add-strings", "656": "multiply-strings", "657": "insert-delete-getrandom-o1", "658": "swap-without-extra-variable-only-c", "659": "encode-and-decode-strings", "660": "read-n-characters-given-read4-ii-call-multiple-times", "661": "convert-bst-to-greater-tree", "662": "guess-number-higher-or-lower", "663": "walls-and-gates", "664": "counting-bits", "665": "range-sum-query-2d-immutable", "666": "guess-number-higher-or-lower-ii", "667": "longest-palindromic-subsequence", "668": "ones-and-zeroes", "669": "coin-change", "670": "predict-the-winner", "671": "rotate-words", "676": "decode-ways-ii", "677": "number-of-big-islands", "678": "shortest-palindrome", "679": "unique-paths-iii", "680": "split-string", "681": "first-missing-prime-number", "683": "word-break-iii", "684": "missing-string", "685": "first-unique-number-in-data-stream", "688": "the-number-in-words", "689": "two-sum-iv-input-is-a-bst", "690": "factorial", "691": "recover-binary-search-tree", "692": "sliding-window-unique-elements-sum", "696": "course-schedule-iii", "697": "sum-of-square-numbers", "698": "maximum-distance-in-arrays", "699": "check-sum-of-k-primes", "700": "cutting-a-rod", "701": "trim-a-binary-search-tree", "702": "concatenated-string-with-uncommon-characters-of-two-strings", "703": "folding-array", "704": "bulb-switcher-ii", "706": "binary-watch", "707": "optimal-account-balancing", "708": "elevator-system-oo-design", "709": "restaurant-oo-design", "710": "hotel-oo-design", "712": "vending-machine-oo-design", "714": "black-jack-oo-design", "717": "tree-longest-path-with-same-value", "718": "repeat-string", "719": "calculate-maximum-value", "720": "rearrange-a-string-with-integers", "721": "next-sparse-number", "722": "maximum-subarray-vi", "723": "rotate-bits-left", "724": "minimum-partition", "725": "boolean-parenthesization", "726": "check-full-binary-tree", "727": "chinese-remainder-theorem", "728": "three-distinct-factors", "729": "last-digit-by-factorial-divide", "730": "sum-of-all-subsets", "731": "restaurant-ii-oo-design", "732": "hotel-ii-oo-design", "734": "number-of-subsequences-of-form-ai-bj-ck", "735": "replace-with-greatest-from-right", "737": "find-elements-in-matrix", "738": "count-different-palindromic-subsequences", "739": "24-game", "740": "coin-change-2", "741": "calculate-maximum-value-ii", "742": "self-dividing-numbers", "743": "monotone-increasing-digits", "744": "sum-of-first-k-even-length-palindrome-numbers", "745": "palindromic-ranges", "747": "coffee-maker-oo-design", "748": "kindle-oo-design", "749": "johns-backyard-garden", "750": "portal", "751": "johns-business", "752": "rogue-knight-sven", "761": "smallest-subset", "762": "longest-common-subsequence-ii", "763": "hex-conversion", "764": "calculate-circumference-and-area", "765": "valid-triangle", "766": "leap-year", "767": "reverse-array", "768": "yang-hui-triangle", "769": "spiral-array", "770": "maximum-and-minimum", "771": "double-factorial", "772": "group-anagrams", "774": "repeated-dna", "775": "palindrome-pairs", "776": "strobogrammatic-number-ii", "777": "valid-perfect-square", "778": "pacific-atlantic-water-flow", "779": "generalized-abbreviation", "780": "remove-invalid-parentheses", "782": "and-and-or", "783": "minimum-risk-path", "784": "the-longest-common-prefix-ii", "785": "maximum-weighted-sum-path", "786": "linked-list-weighted-sum-in-reverse-order", "787": "the-maze", "788": "the-maze-ii", "789": "the-maze-iii", "790": "parser", "791": "merge-number", "792": "kth-prime-number", "793": "intersection-of-arrays", "794": "sliding-puzzle-ii", "795": "4-way-unique-paths", "796": "open-the-lock", "797": "reach-a-number", "798": "backpack-vii", "799": "backpack-viii", "800": "backpack-ix", "801": "backpack-x", "802": "sudoku-solver", "803": "shortest-distance-from-all-buildings", "804": "number-of-distinct-islands-ii", "805": "maximum-association-set", "806": "buy-fruits", "807": "palindrome-number-ii", "808": "movie-network", "813": "find-anagram-mappings", "814": "shortest-path-in-undirected-graph", "815": "course-schedule-iv", "816": "traveling-salesman", "817": "range-sum-query-2d-mutable", "818": "subset-with-target", "819": "word-sorting", "820": "rectangle", "821": "time-intersection", "822": "reverse-order-storage", "823": "input-stream", "824": "single-number-iv", "825": "bus-station", "826": "computer-maintenance", "828": "word-pattern", "829": "word-pattern-ii", "830": "string-sort", "831": "3sum-ii", "832": "count-negative-number", "833": "process-sequence", "834": "remove-duplicate-letters", "835": "hamming-distance", "836": "partition-to-k-equal-sum-subsets", "837": "palindromic-substrings", "838": "subarray-sum-equals-k", "839": "merge-two-sorted-interval-lists", "840": "range-sum-query-mutable", "841": "string-replace", "842": "origami", "843": "digital-flip", "844": "number-pair-statistics", "845": "greatest-common-divisor", "846": "multi-keyword-sort", "848": "minimize-max-distance-to-gas-station", "849": "basic-calculator-iii", "851": "pour-water", "853": "number-of-corner-rectangles", "854": "closest-leaf-in-a-binary-tree", "856": "sentence-similarity", "857": "minimum-window-subsequence", "858": "candy-crush", "860": "number-of-distinct-islands", "861": "k-empty-slots", "862": "next-closest-time", "863": "binary-tree-path-sum-iv", "864": "equal-tree-partition", "865": "remove-9", "866": "coin-path", "867": "4-keys-keyboard", "868": "maximum-average-subarray", "869": "find-the-derangement-of-an-array", "871": "minimum-factorization", "872": "kill-process", "873": "squirrel-simulation", "874": "maximum-vacation-days", "875": "longest-line-of-consecutive-one-in-matrix", "876": "split-concatenated-strings", "877": "split-array-with-equal-sum", "878": "boundary-of-binary-tree", "879": "output-contest-matches", "880": "construct-binary-tree-from-string", "883": "max-consecutive-ones-ii", "884": "find-permutation", "885": "encode-string-with-shortest-length", "886": "convex-polygon", "887": "ternary-expression-parser", "888": "valid-word-square", "889": "sentence-screen-fitting", "891": "valid-palindrome-ii", "892": "alien-dictionary", "893": "longest-palindromic-substring-ii", "894": "pancake-sorting", "895": "friend-request", "896": "prime-product", "897": "island-city", "898": "leftmost-one", "900": "closest-binary-search-tree-value", "901": "closest-binary-search-tree-value-ii", "902": "kth-smallest-element-in-a-bst", "903": "range-addition", "904": "plus-one-linked-list", "906": "sort-transformed-array", "908": "line-reflection", "909": "android-unlock-patterns", "911": "maximum-size-subarray-sum-equals-k", "912": "best-meeting-point", "913": "flip-game-ii", "914": "flip-game", "915": "inorder-predecessor-in-bst", "916": "palindrome-permutation", "917": "palindrome-permutation-ii", "918": "3sum-smaller", "919": "meeting-rooms-ii", "920": "meeting-rooms", "921": "count-univalue-subtrees", "927": "reverse-words-in-a-string-ii", "931": "median-of-k-sorted-arrays", "932": "friends-within-three-jumps", "933": "tuple-multiply", "934": "unlock-problem", "935": "cartesian-product", "937": "how-many-problem-can-i-accept", "939": "binary-tree-kth-floor-node", "940": "maximum-absolute-value", "941": "sliding-puzzle", "943": "range-sum-query-immutable", "944": "maximum-submatrix", "945": "task-scheduler", "946": "233-matrix", "947": "matrix-power-series", "949": "fibonacci-ii", "950": "sliding-puzzle-iii", "951": "rearrange", "952": "digital-problem", "953": "the-biggest-score-on-the-tree", "954": "insert-delete-getrandom-o1-duplicates-allowed", "955": "implement-queue-by-circular-array", "956": "data-segmentation", "957": "radar-detection", "958": "palindrome-data-stream", "959": "k-spaced-array-sorting", "960": "first-unique-number-in-data-stream-ii", "969": "longest-repeating-substring", "970": "big-business", "971": "surplus-value-backpack", "972": "deliver-the-message", "973": "1-bit-and-2-bit-characters", "974": "01-matrix", "975": "2-keys-keyboard", "976": "4sum-ii", "977": "base-7", "978": "basic-calculator", "979": "additive-number", "980": "basic-calculator-ii", "981": "basic-calculator-iv", "982": "arithmetic-slices", "983": "baseball-game", "984": "arithmetic-slices-ii-subsequence", "985": "can-i-win", "986": "battleships-in-a-board", "987": "binary-number-with-alternating-bits", "988": "arranging-coins", "989": "array-nesting", "990": "beautiful-arrangement", "991": "bulb-switcher", "992": "beautiful-arrangement-ii", "993": "array-partition-i", "994": "contiguous-array", "995": "best-time-to-buy-and-sell-stock-with-cooldown", "996": "maximum-slope-straight-line", "997": "print-organization-chart", "998": "construction-queue", "1000": "best-time-to-buy-and-sell-stock-with-transaction-fee", "1001": "asteroid-collision", "1002": "bus-routes", "1003": "binary-tree-pruning", "1005": "largest-triangle-area", "1006": "subdomain-visit-count", "1007": "chalkboard-xor-game", "1008": "expressive-words", "1010": "max-increase-to-keep-city-skyline", "1011": "number-of-lines-to-write-string", "1013": "unique-morse-code-words", "1014": "bricks-falling-when-hit", "1015": "find-eventual-safe-states", "1016": "minimum-swaps-to-make-sequences-increasing", "1017": "similar-rgb-color", "1018": "champagne-tower", "1019": "smallest-rotation-with-highest-score", "1020": "all-paths-from-source-to-target", "1021": "number-of-subarrays-with-bounded-maximum", "1022": "valid-tic-tac-toe-state", "1023": "preimage-size-of-factorial-zeroes-function", "1024": "number-of-matching-subsequences", "1026": "domino-and-tromino-tiling", "1027": "escape-the-ghosts", "1028": "rotated-digits", "1029": "cheapest-flights-within-k-stops", "1030": "k-th-smallest-prime-fraction", "1031": "is-graph-bipartite", "1032": "letter-case-permutation", "1033": "minimum-difference-between-bst-nodes", "1034": "transform-to-chessboard", "1035": "rabbits-in-forest", "1036": "reaching-points", "1037": "global-and-local-inversions", "1038": "jewels-and-stones", "1039": "max-chunks-to-make-sorted", "1040": "max-chunks-to-make-sorted-ii", "1042": "toeplitz-matrix", "1043": "couples-holding-hands", "1044": "largest-plus-sign", "1045": "partition-labels", "1046": "prime-number-of-set-bits-in-binary-representation", "1047": "special-binary-string", "1048": "set-intersection-size-at-least-two", "1049": "pyramid-transition-matrix", "1051": "contain-virus", "1052": "shortest-completing-word", "1054": "min-cost-climbing-stairs", "1056": "find-smallest-letter-greater-than-target", "1057": "network-delay-time", "1058": "cherry-pickup", "1059": "delete-and-earn", "1060": "daily-temperatures", "1061": "parse-lisp-expression", "1062": "flood-fill", "1063": "my-calendar-iii", "1064": "my-calendar-ii", "1065": "my-calendar-i", "1066": "verify-preorder-serialization-of-a-binary-tree", "1068": "find-pivot-index", "1069": "remove-comments", "1070": "accounts-merge", "1071": "longest-word-in-dictionary", "1074": "range-module", "1075": "subarray-product-less-than-k", "1076": "minimum-ascii-delete-sum-for-two-strings", "1077": "falling-squares", "1078": "degree-of-an-array", "1079": "count-binary-substrings", "1080": "max-area-of-island", "1081": "stickers-to-spell-word", "1083": "maximum-sum-of-3-non-overlapping-subarrays", "1085": "longest-univalue-path", "1086": "repeated-string-match", "1087": "redundant-connection-ii", "1088": "redundant-connection", "1089": "valid-parenthesis-string", "1090": "map-sum-pairs", "1092": "cut-off-trees-for-golf-event", "1093": "number-of-longest-increasing-subsequence", "1094": "second-minimum-node-in-a-binary-tree", "1095": "maximum-swap", "1097": "kth-smallest-number-in-multiplication-table", "1099": "non-decreasing-array", "1100": "strange-printer", "1101": "maximum-width-of-binary-tree", "1103": "split-array-into-consecutive-subsequences", "1104": "judge-route-circle", "1105": "print-binary-tree", "1106": "maximum-binary-tree", "1109": "dota2-senate", "1110": "replace-words", "1112": "set-mismatch", "1113": "solve-the-equation", "1114": "shopping-offers", "1116": "exclusive-time-of-functions", "1117": "smallest-range", "1118": "k-inverse-pairs-array", "1119": "maximum-product-of-three-numbers", "1122": "add-one-row-to-tree", "1126": "merge-two-binary-trees", "1127": "add-bold-tag-in-string", "1132": "valid-triangle-number", "1134": "find-duplicate-file-in-system", "1137": "construct-string-from-binary-tree", "1138": "can-place-flowers", "1142": "non-negative-integers-without-consecutive-ones", "1143": "minimum-index-sum-of-two-lists", "1144": "range-addition-ii", "1148": "longest-harmonious-subsequence", "1149": "valid-square", "1150": "fraction-addition-and-subtraction", "1151": "tag-validator", "1152": "erect-the-fence", "1156": "delete-operation-for-two-strings", "1157": "shortest-unsorted-continuous-subarray", "1163": "distribute-candies", "1164": "wiggle-subsequence", "1165": "subtree-of-another-tree", "1169": "permutation-in-string", "1170": "reshape-the-matrix", "1171": "find-the-closest-palindrome", "1172": "binary-tree-tilt", "1173": "reverse-words-in-a-string-iii", "1174": "next-greater-element-iii", "1176": "optimal-division", "1177": "student-attendance-record-ii", "1178": "student-attendance-record-i", "1180": "remove-boxes", "1181": "diameter-of-binary-tree", "1183": "single-element-in-a-sorted-array", "1184": "minimum-time-difference", "1185": "complex-number-multiplication", "1187": "k-diff-pairs-in-an-array", "1188": "minimum-absolute-difference-in-bst", "1190": "longest-word-in-dictionary-through-deleting", "1191": "longest-uncommon-subsequence-ii", "1192": "longest-uncommon-subsequence-i", "1193": "detect-capital", "1194": "super-washing-machines", "1195": "find-largest-value-in-each-tree-row", "1197": "find-bottom-left-tree-value", "1198": "most-frequent-subtree-sum", "1199": "perfect-number", "1200": "relative-ranks", "1201": "next-greater-element-ii", "1202": "ipo", "1203": "find-mode-in-binary-search-tree", "1204": "keyboard-row", "1205": "diagonal-traverse", "1206": "next-greater-element-i", "1207": "teemo-attacking", "1208": "target-sum", "1209": "construct-the-rectangle", "1210": "increasing-subsequences", "1211": "zuma-game", "1213": "smallest-good-base", "1214": "license-key-formatting", "1215": "magical-string", "1216": "largest-palindrome-product", "1217": "total-hamming-distance", "1218": "number-complement", "1219": "heaters", "1220": "matchsticks-to-square", "1222": "validate-ip-address", "1223": "unique-substrings-in-wraparound-string", "1224": "count-the-repetitions", "1225": "island-perimeter", "1226": "minimum-moves-to-equal-array-elements-ii", "1227": "repeated-substring-pattern", "1228": "poor-pigs", "1229": "circular-array-loop", "1230": "assign-cookies", "1231": "minimum-moves-to-equal-array-elements", "1232": "minimum-number-of-arrows-to-burst-balloons", "1236": "find-all-numbers-disappeared-in-an-array", "1237": "number-of-boomerangs", "1238": "find-all-duplicates-in-an-array", "1239": "k-th-smallest-in-lexicographical-order", "1242": "non-overlapping-intervals", "1243": "number-of-segments-in-a-string", "1244": "minimum-genetic-mutation", "1245": "all-oone-data-structure", "1246": "longest-repeating-character-replacement", "1247": "reconstruct-original-digits-from-english", "1248": "maximum-xor-of-two-numbers-in-an-array", "1249": "strong-password-checker", "1251": "split-array-largest-sum", "1252": "queue-reconstruction-by-height", "1253": "convert-a-number-to-hexadecimal", "1254": "sum-of-left-leaves", "1255": "remove-k-digits", "1256": "nth-digit", "1259": "integer-replacement", "1260": "rotate-function", "1261": "longest-substring-with-at-least-k-repeating-characters", "1262": "utf-8-validation", "1263": "is-subsequence", "1264": "perfect-rectangle", "1265": "elimination-game", "1266": "find-the-difference", "1270": "ransom-note", "1272": "kth-smallest-element-in-a-sorted-matrix", "1275": "super-pow", "1277": "water-and-jug-problem", "1278": "max-sum-of-rectangle-no-larger-than-k", "1279": "count-numbers-with-unique-digits", "1282": "reverse-vowels-of-a-string", "1283": "reverse-string", "1284": "integer-break", "1285": "power-of-four", "1286": "self-crossing", "1287": "increasing-triplet-subsequence", "1288": "reconstruct-itinerary", "1289": "number-of-atoms", "1290": "patching-array", "1291": "longest-increasing-path-in-a-matrix", "1292": "odd-even-linked-list", "1293": "count-of-range-sum", "1294": "power-of-three", "1296": "maximum-product-of-word-lengths", "1297": "count-of-smaller-numbers-after-self", "1298": "minimum-height-trees", "1300": "nim-game", "1304": "h-index", "1305": "integer-to-english-words", "1307": "verify-preorder-sequence-in-binary-search-tree", "1308": "factor-combinations", "1309": "different-ways-to-add-parentheses", "1310": "product-of-array-except-self", "1312": "number-of-digit-one", "1314": "power-of-two", "1315": "summary-ranges", "1317": "count-complete-tree-nodes", "1318": "contains-duplicate-iii", "1319": "contains-duplicate-ii", "1320": "contains-duplicate", "1324": "count-primes", "1325": "bitwise-and-of-numbers-range", "1332": "number-of-1-bits", "1334": "rotate-array", "1335": "repeated-dna-sequences", "1346": "dungeon-game", "1347": "factorial-trailing-zeroes", "1348": "excel-sheet-column-number", "1350": "excel-sheet-column-title", "1351": "fraction-to-recurring-decimal", "1352": "compare-version-numbers", "1353": "sum-root-to-leaf-numbers", "1354": "pascals-triangle-ii", "1360": "symmetric-tree", "1361": "text-justification", "1362": "substring-with-concatenation-of-all-words", "1363": "zigzag-conversion", "1365": "minimum-cycle-section", "1366": "directed-graph-loop", "1367": "police-distance", "1368": "same-number", "1369": "most-common-word", "1374": "shortest-distance-in-3d-space", "1375": "substring-with-at-least-k-distinct-characters", "1376": "equivalent-strings", "1377": "find-substring", "1378": "minimum-string-array-coverage", "1379": "the-longest-scene", "1380": "log-sorting", "1381": "maximum-line-coverage", "1382": "high-capacity-backpack", "1383": "subtree-count", "1384": "segment-stones-merge", "1385": "lucky-number-eight", "1386": "cable-car-ride", "1387": "binary-trees-with-factors", "1388": "card-flipping-game", "1391": "making-a-large-island", "1392": "most-profit-assigning-work", "1393": "friends-of-appropriate-ages", "1394": "goat-latin", "1395": "the-barycentre-of-the-trees", "1396": "set-union", "1397": "digital-coverage", "1398": "k-decimal-addition", "1399": "take-coins", "1400": "fermat-point-of-graphs", "1401": "twitch-words", "1402": "recommend-friends", "1403": "maximum-product-path", "1408": "gas-station-ii", "1409": "matrix-finding-number", "1410": "matrix-water-injection", "1411": "edit-distance-replace-edition", "1412": "pick-three-numbers", "1413": "tree", "1414": "eat-the-beans", "1415": "residual-product", "1416": "the-previous-number", "1417": "weighing-problem", "1434": "sum-of-distances-in-tree", "1441": "four-numbers-multiply-problem", "1442": "order-problem", "1443": "longest-ab-substring", "1444": "dyeing-problem", "1445": "delete-characters", "1446": "01-matrix-walking-problem", "1447": "calculation-the-sum-of-path", "1448": "card-game", "1454": "word-frequency-count", "1455": "valid-array", "1456": "word-synthesis-problem", "1457": "search-subarray", "1458": "minimum-submatrix", "1459": "judge-the-last-number", "1463": "paper-review", "1464": "the-k-th-combination", "1465": "order-of-tasks", "1466": "best-shopping-plan", "1467": "ask-for-cooling-time", "1468": "two-numbers-that-are-not-repeated", "1469": "longest-path-on-the-tree", "1470": "the-game-of-take-numbers", "1471": "set-operation", "1472": "twins-strings", "1473": "find-the-sum-of-the-array", "1474": "shortest-phrase", "1475": "minimum-legal-bracket-sequence", "1478": "closest-target-value", "1479": "can-reach-the-endpoint", "1480": "dot-product", "1481": "unique-substring", "1482": "minimum-sum-path", "1484": "the-most-frequent-word", "1486": "function-runtime", "1487": "judging-triangle", "1488": "longest-sequence", "1489": "the-largest-sum-of-the-matrix-boundary-elements", "1510": "buddy-strings", "1535": "to-lower-case", "1538": "card-game-ii", "1539": "flipped-the-pixel", "1540": "can-convert", "1541": "put-box", "1542": "nexttime-norepeat", "1543": "unique-path-iv", "1544": "magic-square", "1545": "last-closest-time", "1546": "coin-problem", "1552": "parking-problem", "1553": "climbing-stairs-iii", "1554": "lasttime-norepeat", "1555": "flower-problem", "1556": "guess-game", "1557": "array-maximum-value", "1558": "interlaced-positive-and-negative-numbers", "1559": "take-the-element-and-query-the-sum", "1560": "minimumstring", "1561": "bst-node-distance", "1562": "number-of-restaurants", "1563": "shortest-path-to-the-destination", "1564": "interval-search", "1565": "modern-ludo-i", "1566": "minimum-difference", "1567": "maximum-can-exchanged-subarray", "1568": "poison-test", "1569": "social-network", "1570": "binary-stream", "1571": "top-k-gpa", "1572": "asking-for-the-longest-01-substring", "1573": "legal-string", "1574": "music-playlist", "1575": "spring-tour", "1576": "optimal-match", "1577": "sum-of-leaf-nodes", "1580": "transition-string", "1583": "maximum-number-sum", "1584": "number-of-xor-values", "1585": "moving-stones", "1586": "minimum-number-of-keystrokes", "1610": "find-the-numbers", "1611": "shortest-subarray", "1612": "smallest-path", "1613": "highest-frequency-ip", "1614": "highest-growth-stock", "1615": "the-result-of-investment", "1616": "shortest-subarray-ii", "1617": "array-maximum-difference", "1618": "processing-form", "1619": "candy-ii", "1620": "collecting-coins", "1621": "cut-connection", "1623": "minimal-distance-in-the-array", "1624": "max-distance", "1625": "words-compression", "1626": "salary-adjustment", "1627": "word-segmentation", "1628": "driving-problem", "1629": "find-the-nearest-store", "1630": "interesting-string", "1631": "interesting-subarray", "1632": "count-email-groups", "1633": "strings-that-satisfies-the-condition", "1634": "secret-word", "1635": "max-pair", "1636": "aerial-movie", "1637": "tree-problem", "1638": "least-substring", "1639": "k-substring-with-k-different-characters", "1640": "duplicates-digits", "1641": "max-remove-order", "1642": "query-string", "1643": "pick-fruits", "1644": "plane-maximum-rectangle", "1645": "least-subsequences", "1646": "checkwords", "1713": "unique-email-addresses", "1737": "fruit-into-baskets", "1778": "odd-even-jump", "1779": "shortest-duplicate-subarray"};
const leetcode_to_algocasts = {"543": {"id": 150, "link": "https://algocasts.io/episodes/nwp8ArW7"}, "96": {"id": 149, "link": "https://algocasts.io/episodes/XZWv3Nm7"}, "221": {"id": 148, "link": "https://algocasts.io/episodes/Q2pr0ymz"}, "85": {"id": 147, "link": "https://algocasts.io/episodes/6emEjnGV"}, "84": {"id": 146, "link": "https://algocasts.io/episodes/RVmVlopQ"}, "208": {"id": 145, "link": "https://algocasts.io/episodes/4rpalaGZ"}, "122": {"id": 144, "link": "https://algocasts.io/episodes/n5GqnVpA"}, "437": {"id": 143, "link": "https://algocasts.io/episodes/Yopkb0G3"}, "238": {"id": 142, "link": "https://algocasts.io/episodes/aVWyPJp2"}, "538": {"id": 141, "link": "https://algocasts.io/episodes/8eGxrAWM"}, "470": {"id": 140, "link": "https://algocasts.io/episodes/JNmDVZpO"}, "235": {"id": 139, "link": "https://algocasts.io/episodes/j5pgj3Gx"}, "236": {"id": 138, "link": "https://algocasts.io/episodes/ezplgPGE"}, "448": {"id": 137, "link": "https://algocasts.io/episodes/dlWb1kpv"}, "151": {"id": 136, "link": "https://algocasts.io/episodes/BPp63kWr"}, "260": {"id": 135, "link": "https://algocasts.io/episodes/yRp366G4"}, "493": {"id": 134, "link": "https://algocasts.io/episodes/q6G7gKG0"}, "387": {"id": 132, "link": "https://algocasts.io/episodes/Y9pJkYWA"}, "113": {"id": 131, "link": "https://algocasts.io/episodes/k8GNO5pe"}, "946": {"id": 129, "link": "https://algocasts.io/episodes/KApAz4W6"}, "54": {"id": 128, "link": "https://algocasts.io/episodes/AwmXkzWx"}, "153": {"id": 127, "link": "https://algocasts.io/episodes/q2m5w5pz"}, "237": {"id": 126, "link": "https://algocasts.io/episodes/VBpL0opD"}, "210": {"id": 125, "link": "https://algocasts.io/episodes/XOp1oam2"}, "207": {"id": 124, "link": "https://algocasts.io/episodes/rLmP3yWo"}, "114": {"id": 123, "link": "https://algocasts.io/episodes/VlWd6vG0"}, "232": {"id": 122, "link": "https://algocasts.io/episodes/jwmBznm8"}, "233": {"id": 121, "link": "https://algocasts.io/episodes/deG4RbW1"}, "338": {"id": 120, "link": "https://algocasts.io/episodes/Qqpn4lmk"}, "572": {"id": 119, "link": "https://algocasts.io/episodes/M0G2Q7mz"}, "509": {"id": 118, "link": "https://algocasts.io/episodes/17WMX8pj"}, "79": {"id": 117, "link": "https://algocasts.io/episodes/LPmw0oGq"}, "78": {"id": 116, "link": "https://algocasts.io/episodes/kVG9exGg"}, "49": {"id": 115, "link": "https://algocasts.io/episodes/vkmerKGb"}, "771": {"id": 114, "link": "https://algocasts.io/episodes/VXGOxEpQ"}, "48": {"id": 113, "link": "https://algocasts.io/episodes/zbmKwgmZ"}, "39": {"id": 112, "link": "https://algocasts.io/episodes/dbGYoeW5"}, "61": {"id": 111, "link": "https://algocasts.io/episodes/ldGjkYp9"}, "189": {"id": 110, "link": "https://algocasts.io/episodes/Z5mzgwGd"}, "34": {"id": 109, "link": "https://algocasts.io/episodes/QrWZJaW5"}, "42": {"id": 108, "link": "https://algocasts.io/episodes/eAGQ1MG4"}, "45": {"id": 107, "link": "https://algocasts.io/episodes/AEpo1vmQ"}, "55": {"id": 106, "link": "https://algocasts.io/episodes/nwp85rW7"}, "133": {"id": 105, "link": "https://algocasts.io/episodes/XZWvPNG7"}, "86": {"id": 104, "link": "https://algocasts.io/episodes/Q2prgyWz"}, "76": {"id": 103, "link": "https://algocasts.io/episodes/6emEOnpV"}, "138": {"id": 102, "link": "https://algocasts.io/episodes/RVmVkoGQ"}, "876": {"id": 101, "link": "https://algocasts.io/episodes/4rpa6aWZ"}, "32": {"id": 100, "link": "https://algocasts.io/episodes/n5GqbVpA"}, "264": {"id": 99, "link": "https://algocasts.io/episodes/ldGjk7p9"}, "139": {"id": 98, "link": "https://algocasts.io/episodes/Z5mzgJGd"}, "31": {"id": 97, "link": "https://algocasts.io/episodes/QrWZJbW5"}, "148": {"id": 96, "link": "https://algocasts.io/episodes/eAGQ1lG4"}, "128": {"id": 95, "link": "https://algocasts.io/episodes/AEpo1MmQ"}, "142": {"id": 94, "link": "https://algocasts.io/episodes/nwp85DW7"}, "239": {"id": 93, "link": "https://algocasts.io/episodes/XZWvPBG7"}, "450": {"id": 92, "link": "https://algocasts.io/episodes/Q2prgeWz"}, "33": {"id": 91, "link": "https://algocasts.io/episodes/6emEOjpV"}, "23": {"id": 90, "link": "https://algocasts.io/episodes/RVmVkkGQ"}, "581": {"id": 89, "link": "https://algocasts.io/episodes/4rpa6qWZ"}, "91": {"id": 88, "link": "https://algocasts.io/episodes/n5Gqb4pA"}, "200": {"id": 87, "link": "https://algocasts.io/episodes/Yopk3yp3"}, "75": {"id": 86, "link": "https://algocasts.io/episodes/aVWyAYW2"}, "322": {"id": 85, "link": "https://algocasts.io/episodes/8eGx43GM"}, "518": {"id": 84, "link": "https://algocasts.io/episodes/JNmDARGO"}, "557": {"id": 83, "link": "https://algocasts.io/episodes/j5pgPlWx"}, "617": {"id": 82, "link": "https://algocasts.io/episodes/ezpljkmE"}, "344": {"id": 81, "link": "https://algocasts.io/episodes/dlWb3xmv"}, "283": {"id": 80, "link": "https://algocasts.io/episodes/BPp65lGr"}, "300": {"id": 79, "link": "https://algocasts.io/episodes/yRp3Mym4"}, "746": {"id": 78, "link": "https://algocasts.io/episodes/q6G7qZW0"}, "63": {"id": 77, "link": "https://algocasts.io/episodes/qjG08bGK"}, "62": {"id": 76, "link": "https://algocasts.io/episodes/Y9pJQNGA"}, "152": {"id": 75, "link": "https://algocasts.io/episodes/k8GNBaGe"}, "82": {"id": 74, "link": "https://algocasts.io/episodes/D1mR9jWz"}, "83": {"id": 73, "link": "https://algocasts.io/episodes/KApAOjm6"}, "213": {"id": 72, "link": "https://algocasts.io/episodes/AwmXV9px"}, "198": {"id": 71, "link": "https://algocasts.io/episodes/q2m5D2Wz"}, "409": {"id": 70, "link": "https://algocasts.io/episodes/VBpLwqGD"}, "131": {"id": 69, "link": "https://algocasts.io/episodes/XOp1wZm2"}, "108": {"id": 68, "link": "https://algocasts.io/episodes/rLmP98Go"}, "700": {"id": 67, "link": "https://algocasts.io/episodes/VlWdg8p0"}, "118": {"id": 66, "link": "https://algocasts.io/episodes/jwmBr5m8"}, "144": {"id": 65, "link": "https://algocasts.io/episodes/deG49vp1"}, "106": {"id": 64, "link": "https://algocasts.io/episodes/QqpnP6mk"}, "105": {"id": 63, "link": "https://algocasts.io/episodes/M0G2DaWz"}, "112": {"id": 62, "link": "https://algocasts.io/episodes/17WMBomj"}, "218": {"id": 61, "link": "https://algocasts.io/episodes/LPmwqNpq"}, "56": {"id": 60, "link": "https://algocasts.io/episodes/kVG9AYGg"}, "215": {"id": 59, "link": "https://algocasts.io/episodes/vkmelbWb"}, "384": {"id": 58, "link": "https://algocasts.io/episodes/VXGOkqGQ"}, "703": {"id": 57, "link": "https://algocasts.io/episodes/zbmK2MWZ"}, "540": {"id": 56, "link": "https://algocasts.io/episodes/dbGY42m5"}, "461": {"id": 55, "link": "https://algocasts.io/episodes/ldGj37p9"}, "69": {"id": 54, "link": "https://algocasts.io/episodes/Z5mzEJWd"}, "15": {"id": 53, "link": "https://algocasts.io/episodes/QrWZrbW5"}, "19": {"id": 52, "link": "https://algocasts.io/episodes/eAGQQlG4"}, "64": {"id": 51, "link": "https://algocasts.io/episodes/AEpoAMmQ"}, "73": {"id": 50, "link": "https://algocasts.io/episodes/nwp8gDG7"}, "191": {"id": 49, "link": "https://algocasts.io/episodes/XZWvbBW7"}, "203": {"id": 48, "link": "https://algocasts.io/episodes/Q2pr4emz"}, "226": {"id": 47, "link": "https://algocasts.io/episodes/6emEEjmV"}, "121": {"id": 46, "link": "https://algocasts.io/episodes/RVmV3kGQ"}, "20": {"id": 45, "link": "https://algocasts.io/episodes/4rpaqqpZ"}, "98": {"id": 44, "link": "https://algocasts.io/episodes/n5GqP4mA"}, "28": {"id": 43, "link": "https://algocasts.io/episodes/Yopkym35"}, "8": {"id": 42, "link": "https://algocasts.io/episodes/aVWyYW25"}, "263": {"id": 41, "link": "https://algocasts.io/episodes/8eGx3mMO"}, "2": {"id": 40, "link": "https://algocasts.io/episodes/JNmDRpOZ"}, "110": {"id": 39, "link": "https://algocasts.io/episodes/j5pglWx8"}, "74": {"id": 38, "link": "https://algocasts.io/episodes/ezplkGEn"}, "35": {"id": 37, "link": "https://algocasts.io/episodes/dlWbxGvA"}, "704": {"id": 36, "link": "https://algocasts.io/episodes/BPp6lmrK"}, "94": {"id": 35, "link": "https://algocasts.io/episodes/yRp3ym4x"}, "107": {"id": 34, "link": "https://algocasts.io/episodes/q6G7Zm05"}, "102": {"id": 33, "link": "https://algocasts.io/episodes/qjG0bWK2"}, "70": {"id": 32, "link": "https://algocasts.io/episodes/Y9pJNpAb"}, "11": {"id": 31, "link": "https://algocasts.io/episodes/k8GNameQ"}, "72": {"id": 30, "link": "https://algocasts.io/episodes/D1mRjmzE"}, "22": {"id": 29, "link": "https://algocasts.io/episodes/KApAjW6R"}, "160": {"id": 28, "link": "https://algocasts.io/episodes/AwmX9Gx6"}, "141": {"id": 27, "link": "https://algocasts.io/episodes/q2m52Gzn"}, "5": {"id": 26, "link": "https://algocasts.io/episodes/VBpLqWD8"}, "3": {"id": 25, "link": "https://algocasts.io/episodes/XOp1ZW2e"}, "146": {"id": 24, "link": "https://algocasts.io/episodes/rLmP8moY"}, "169": {"id": 23, "link": "https://algocasts.io/episodes/VlWd8W06"}, "104": {"id": 22, "link": "https://algocasts.io/episodes/jwmB5W8Z"}, "53": {"id": 21, "link": "https://algocasts.io/episodes/deG4vW1R"}, "4": {"id": 20, "link": "https://algocasts.io/episodes/Qqpn6pkK"}, "88": {"id": 19, "link": "https://algocasts.io/episodes/M0G2amzw"}, "21": {"id": 18, "link": "https://algocasts.io/episodes/17WMoGjw"}, "155": {"id": 17, "link": "https://algocasts.io/episodes/LPmwNWqw"}, "111": {"id": 16, "link": "https://algocasts.io/episodes/kVG9YGgq"}, "268": {"id": 15, "link": "https://algocasts.io/episodes/vkmebGbP"}, "234": {"id": 14, "link": "https://algocasts.io/episodes/VXGOqWQd"}, "9": {"id": 13, "link": "https://algocasts.io/episodes/zbmKMpZq"}, "647": {"id": 12, "link": "https://algocasts.io/episodes/dbGY2p5V"}, "46": {"id": 11, "link": "https://algocasts.io/episodes/ldGj7p9j"}, "50": {"id": 10, "link": "https://algocasts.io/episodes/Z5mzJmdn"}, "206": {"id": 9, "link": "https://algocasts.io/episodes/QrWZbW5w"}, "100": {"id": 8, "link": "https://algocasts.io/episodes/eAGQlm4D"}, "240": {"id": 7, "link": "https://algocasts.io/episodes/AEpoMmQ1"}, "136": {"id": 6, "link": "https://algocasts.io/episodes/nwp8Dp7j"}, "371": {"id": 5, "link": "https://algocasts.io/episodes/XZWvBW7n"}, "101": {"id": 4, "link": "https://algocasts.io/episodes/Q2preGz9"}, "167": {"id": 3, "link": "https://algocasts.io/episodes/6emEjGVr"}, "1": {"id": 2, "link": "https://algocasts.io/episodes/RVmVkGQd"}, "125": {"id": 1, "link": "https://algocasts.io/episodes/4rpaqpZb"}}
const lintcode_to_algocasts = {"1181": {"id": 150, "link": "https://algocasts.io/episodes/nwp8ArW7"}, "163": {"id": 149, "link": "https://algocasts.io/episodes/XZWv3Nm7"}, "436": {"id": 148, "link": "https://algocasts.io/episodes/Q2pr0ymz"}, "510": {"id": 147, "link": "https://algocasts.io/episodes/6emEjnGV"}, "122": {"id": 146, "link": "https://algocasts.io/episodes/RVmVlopQ"}, "442": {"id": 145, "link": "https://algocasts.io/episodes/4rpalaGZ"}, "150": {"id": 144, "link": "https://algocasts.io/episodes/n5GqnVpA"}, "472": {"id": 143, "link": "https://algocasts.io/episodes/Yopkb0G3"}, "1310": {"id": 142, "link": "https://algocasts.io/episodes/aVWyPJp2"}, "661": {"id": 141, "link": "https://algocasts.io/episodes/8eGxrAWM"}, "88": {"id": 138, "link": "https://algocasts.io/episodes/ezplgPGE"}, "1236": {"id": 137, "link": "https://algocasts.io/episodes/dlWb1kpv"}, "53": {"id": 136, "link": "https://algocasts.io/episodes/BPp63kWr"}, "84": {"id": 135, "link": "https://algocasts.io/episodes/yRp366G4"}, "532": {"id": 133, "link": "https://algocasts.io/episodes/qjG0K8mK"}, "209": {"id": 132, "link": "https://algocasts.io/episodes/Y9pJkYWA"}, "246": {"id": 131, "link": "https://algocasts.io/episodes/k8GNO5pe"}, "1307": {"id": 130, "link": "https://algocasts.io/episodes/D1mRZemz"}, "374": {"id": 128, "link": "https://algocasts.io/episodes/AwmXkzWx"}, "159": {"id": 127, "link": "https://algocasts.io/episodes/q2m5w5pz"}, "372": {"id": 126, "link": "https://algocasts.io/episodes/VBpL0opD"}, "616": {"id": 125, "link": "https://algocasts.io/episodes/XOp1oam2"}, "615": {"id": 124, "link": "https://algocasts.io/episodes/rLmP3yWo"}, "453": {"id": 123, "link": "https://algocasts.io/episodes/VlWd6vG0"}, "40": {"id": 122, "link": "https://algocasts.io/episodes/jwmBznm8"}, "1312": {"id": 121, "link": "https://algocasts.io/episodes/deG4RbW1"}, "664": {"id": 120, "link": "https://algocasts.io/episodes/Qqpn4lmk"}, "1165": {"id": 119, "link": "https://algocasts.io/episodes/M0G2Q7mz"}, "366": {"id": 118, "link": "https://algocasts.io/episodes/17WMX8pj"}, "123": {"id": 117, "link": "https://algocasts.io/episodes/LPmw0oGq"}, "17": {"id": 116, "link": "https://algocasts.io/episodes/kVG9exGg"}, "772": {"id": 115, "link": "https://algocasts.io/episodes/vkmerKGb"}, "1038": {"id": 114, "link": "https://algocasts.io/episodes/VXGOxEpQ"}, "161": {"id": 113, "link": "https://algocasts.io/episodes/zbmKwgmZ"}, "170": {"id": 111, "link": "https://algocasts.io/episodes/ldGjkYp9"}, "1334": {"id": 110, "link": "https://algocasts.io/episodes/Z5mzgwGd"}, "61": {"id": 109, "link": "https://algocasts.io/episodes/QrWZJaW5"}, "363": {"id": 108, "link": "https://algocasts.io/episodes/eAGQ1MG4"}, "117": {"id": 107, "link": "https://algocasts.io/episodes/AEpo1vmQ"}, "116": {"id": 106, "link": "https://algocasts.io/episodes/nwp85rW7"}, "137": {"id": 105, "link": "https://algocasts.io/episodes/XZWvPNG7"}, "96": {"id": 104, "link": "https://algocasts.io/episodes/Q2prgyWz"}, "32": {"id": 103, "link": "https://algocasts.io/episodes/6emEOnpV"}, "105": {"id": 102, "link": "https://algocasts.io/episodes/RVmVkoGQ"}, "228": {"id": 101, "link": "https://algocasts.io/episodes/4rpa6aWZ"}, "4": {"id": 99, "link": "https://algocasts.io/episodes/ldGjk7p9"}, "107": {"id": 98, "link": "https://algocasts.io/episodes/Z5mzgJGd"}, "52": {"id": 97, "link": "https://algocasts.io/episodes/QrWZJbW5"}, "98": {"id": 96, "link": "https://algocasts.io/episodes/eAGQ1lG4"}, "124": {"id": 95, "link": "https://algocasts.io/episodes/AEpo1MmQ"}, "103": {"id": 94, "link": "https://algocasts.io/episodes/nwp85DW7"}, "362": {"id": 93, "link": "https://algocasts.io/episodes/XZWvPBG7"}, "87": {"id": 92, "link": "https://algocasts.io/episodes/Q2prgeWz"}, "62": {"id": 91, "link": "https://algocasts.io/episodes/6emEOjpV"}, "104": {"id": 90, "link": "https://algocasts.io/episodes/RVmVkkGQ"}, "1157": {"id": 89, "link": "https://algocasts.io/episodes/4rpa6qWZ"}, "512": {"id": 88, "link": "https://algocasts.io/episodes/n5Gqb4pA"}, "433": {"id": 87, "link": "https://algocasts.io/episodes/Yopk3yp3"}, "148": {"id": 86, "link": "https://algocasts.io/episodes/aVWyAYW2"}, "669": {"id": 85, "link": "https://algocasts.io/episodes/8eGx43GM"}, "740": {"id": 84, "link": "https://algocasts.io/episodes/JNmDARGO"}, "1173": {"id": 83, "link": "https://algocasts.io/episodes/j5pgPlWx"}, "1126": {"id": 82, "link": "https://algocasts.io/episodes/ezpljkmE"}, "1283": {"id": 81, "link": "https://algocasts.io/episodes/dlWb3xmv"}, "539": {"id": 80, "link": "https://algocasts.io/episodes/BPp65lGr"}, "76": {"id": 79, "link": "https://algocasts.io/episodes/yRp3Mym4"}, "1054": {"id": 78, "link": "https://algocasts.io/episodes/q6G7qZW0"}, "115": {"id": 77, "link": "https://algocasts.io/episodes/qjG08bGK"}, "114": {"id": 76, "link": "https://algocasts.io/episodes/Y9pJQNGA"}, "191": {"id": 75, "link": "https://algocasts.io/episodes/k8GNBaGe"}, "113": {"id": 74, "link": "https://algocasts.io/episodes/D1mR9jWz"}, "112": {"id": 73, "link": "https://algocasts.io/episodes/KApAOjm6"}, "534": {"id": 72, "link": "https://algocasts.io/episodes/AwmXV9px"}, "392": {"id": 71, "link": "https://algocasts.io/episodes/q2m5D2Wz"}, "627": {"id": 70, "link": "https://algocasts.io/episodes/VBpLwqGD"}, "136": {"id": 69, "link": "https://algocasts.io/episodes/XOp1wZm2"}, "177": {"id": 68, "link": "https://algocasts.io/episodes/rLmP98Go"}, "768": {"id": 66, "link": "https://algocasts.io/episodes/jwmBr5m8"}, "66": {"id": 65, "link": "https://algocasts.io/episodes/deG49vp1"}, "72": {"id": 64, "link": "https://algocasts.io/episodes/QqpnP6mk"}, "73": {"id": 63, "link": "https://algocasts.io/episodes/M0G2DaWz"}, "376": {"id": 62, "link": "https://algocasts.io/episodes/17WMBomj"}, "131": {"id": 61, "link": "https://algocasts.io/episodes/LPmwqNpq"}, "156": {"id": 60, "link": "https://algocasts.io/episodes/kVG9AYGg"}, "5": {"id": 59, "link": "https://algocasts.io/episodes/vkmelbWb"}, "1183": {"id": 56, "link": "https://algocasts.io/episodes/dbGY42m5"}, "835": {"id": 55, "link": "https://algocasts.io/episodes/ldGj37p9"}, "141": {"id": 54, "link": "https://algocasts.io/episodes/Z5mzEJWd"}, "57": {"id": 53, "link": "https://algocasts.io/episodes/QrWZrbW5"}, "174": {"id": 52, "link": "https://algocasts.io/episodes/eAGQQlG4"}, "110": {"id": 51, "link": "https://algocasts.io/episodes/AEpoAMmQ"}, "162": {"id": 50, "link": "https://algocasts.io/episodes/nwp8gDG7"}, "1332": {"id": 49, "link": "https://algocasts.io/episodes/XZWvbBW7"}, "452": {"id": 48, "link": "https://algocasts.io/episodes/Q2pr4emz"}, "175": {"id": 47, "link": "https://algocasts.io/episodes/6emEEjmV"}, "149": {"id": 46, "link": "https://algocasts.io/episodes/RVmV3kGQ"}, "423": {"id": 45, "link": "https://algocasts.io/episodes/4rpaqqpZ"}, "95": {"id": 44, "link": "https://algocasts.io/episodes/n5GqP4mA"}, "13": {"id": 43, "link": "https://algocasts.io/episodes/Yopkym35"}, "54": {"id": 42, "link": "https://algocasts.io/episodes/aVWyYW25"}, "517": {"id": 41, "link": "https://algocasts.io/episodes/8eGx3mMO"}, "167": {"id": 40, "link": "https://algocasts.io/episodes/JNmDRpOZ"}, "93": {"id": 39, "link": "https://algocasts.io/episodes/j5pglWx8"}, "28": {"id": 38, "link": "https://algocasts.io/episodes/ezplkGEn"}, "60": {"id": 37, "link": "https://algocasts.io/episodes/dlWbxGvA"}, "457": {"id": 36, "link": "https://algocasts.io/episodes/BPp6lmrK"}, "67": {"id": 35, "link": "https://algocasts.io/episodes/yRp3ym4x"}, "70": {"id": 34, "link": "https://algocasts.io/episodes/q6G7Zm05"}, "69": {"id": 33, "link": "https://algocasts.io/episodes/qjG0bWK2"}, "111": {"id": 32, "link": "https://algocasts.io/episodes/Y9pJNpAb"}, "383": {"id": 31, "link": "https://algocasts.io/episodes/k8GNameQ"}, "119": {"id": 30, "link": "https://algocasts.io/episodes/D1mRjmzE"}, "427": {"id": 29, "link": "https://algocasts.io/episodes/KApAjW6R"}, "380": {"id": 28, "link": "https://algocasts.io/episodes/AwmX9Gx6"}, "102": {"id": 27, "link": "https://algocasts.io/episodes/q2m52Gzn"}, "200": {"id": 26, "link": "https://algocasts.io/episodes/VBpLqWD8"}, "384": {"id": 25, "link": "https://algocasts.io/episodes/XOp1ZW2e"}, "134": {"id": 24, "link": "https://algocasts.io/episodes/rLmP8moY"}, "46": {"id": 23, "link": "https://algocasts.io/episodes/VlWd8W06"}, "97": {"id": 22, "link": "https://algocasts.io/episodes/jwmB5W8Z"}, "41": {"id": 21, "link": "https://algocasts.io/episodes/deG4vW1R"}, "65": {"id": 20, "link": "https://algocasts.io/episodes/Qqpn6pkK"}, "64": {"id": 19, "link": "https://algocasts.io/episodes/M0G2amzw"}, "165": {"id": 18, "link": "https://algocasts.io/episodes/17WMoGjw"}, "12": {"id": 17, "link": "https://algocasts.io/episodes/LPmwNWqw"}, "155": {"id": 16, "link": "https://algocasts.io/episodes/kVG9YGgq"}, "196": {"id": 15, "link": "https://algocasts.io/episodes/vkmebGbP"}, "223": {"id": 14, "link": "https://algocasts.io/episodes/VXGOqWQd"}, "491": {"id": 13, "link": "https://algocasts.io/episodes/zbmKMpZq"}, "837": {"id": 12, "link": "https://algocasts.io/episodes/dbGY2p5V"}, "15": {"id": 11, "link": "https://algocasts.io/episodes/ldGj7p9j"}, "428": {"id": 10, "link": "https://algocasts.io/episodes/Z5mzJmdn"}, "35": {"id": 9, "link": "https://algocasts.io/episodes/QrWZbW5w"}, "469": {"id": 8, "link": "https://algocasts.io/episodes/eAGQlm4D"}, "38": {"id": 7, "link": "https://algocasts.io/episodes/AEpoMmQ1"}, "82": {"id": 6, "link": "https://algocasts.io/episodes/nwp8Dp7j"}, "1360": {"id": 4, "link": "https://algocasts.io/episodes/Q2preGz9"}, "608": {"id": 3, "link": "https://algocasts.io/episodes/6emEjGVr"}, "56": {"id": 2, "link": "https://algocasts.io/episodes/RVmVkGQd"}, "415": {"id": 1, "link": "https://algocasts.io/episodes/4rpaqpZb"}}
const configVersion = 2;
function $_get(key) {
let value = GM_getValue(key);
if (value) value = JSON.parse(value);
return value;
}
function $_set(key, value) {
GM_setValue(key, JSON.stringify(value));
}
function getConfigs() {
updateDefaultConfigs();
return $_get('configs');
}
function updateDefaultConfigs() {
const userConfigVersion = $_get('configVersion');
if (userConfigVersion && userConfigVersion >= configVersion) return;
let userConfigs = $_get('configs');
if (!userConfigs) userConfigs = {};
if (!('leetcode_region' in userConfigs)) {
userConfigs['leetcode_region'] = 'global';
}
$_set('configVersion', configVersion);
$_set('configs', userConfigs);
}
function getLeetcodeUrl() {
const configs = getConfigs();
if (configs['leetcode_region'] === 'global') {
return "https://leetcode.com/problems/";
} else {
return "https://leetcode-cn.com/problems/";
}
}
function handleAlgoCasts() {
let badges = $('.badge');
const leetcodeUrl = getLeetcodeUrl();
badges.each((index, element)=>{
let e = $(element);
let eText = e.text().trim();
let isOJ = false;
if (eText.startsWith('leetcode')) {
isOJ = true;
let id = parseInt(eText.split(' ')[1]);
let success = false;
let question__title_slug;
if (id in leetcode_slug) {
// console.log('Good');
success = true;
question__title_slug = leetcode_slug[id];
} else {
// console.log('OMG');
GM_xmlhttpRequest({
method: "GET",
url: 'https://leetcode-cn.com/api/problems/all/',
onload: ({responseText}) => {
if(responseText === '') {return;}
let j = JSON.parse(responseText);
// console.log(j);
for (var i in j.stat_status_pairs) {
let stat = j.stat_status_pairs[i].stat;
if (id === stat.frontend_question_id) {
success = true;
question__title_slug = stat.question__title_slug;
}
}
}
});
}
e.click(()=>{
if (success) {
window.open(leetcodeUrl + question__title_slug + '/');
} else {
window.open(leetcodeUrl+ "all/?search=" + id);
}
});
e.removeClass('no-hover');
} else if (eText.startsWith('lintcode')) {
isOJ = true;
let id = parseInt(eText.split(' ')[1]);
let success = false;
let question_id;
if (id in lintcode_slug) {
// console.log('Good');
success = true;
question_id = '/problem/' + lintcode_slug[id] + '/';
} else {
// console.log('OMG');
GM_xmlhttpRequest({
method: "GET",
url: 'https://www.lintcode.com/zh-cn/search/api/problem/?search_type=all&search_query=' + id,
onload: ({responseText}) => {
if(responseText === '') {return;}
let j = JSON.parse(responseText);
// console.log(j);
for (var i in j.result) {
let item = j.result[i];
if (id === item.pid) {
success = true;
question_id = item.id;
}
}
}
});
}
e.click(()=>{
if (success) {
window.open("https://lintcode.com" + question_id);
} else {
window.open("https://lintcode.com/");
}
});
e.removeClass('no-hover');
}
if (isOJ) {
if (eText.endsWith('.')) {
$(element).text(eText.substring(0, eText.length - 1)).append('<span style="font-size: 0">.</span>');
}
}
});
}
const _$ = (selector) => new Promise(resolve => {
const f = () => {
const s = $(selector);
if (s == null || s.length === 0) {
// console.log("Finding ", selector);
setTimeout(f, 100);
} else {
// console.log("Find ", selector, s);
setTimeout(() => {resolve(s)}, 100);
}
}
f();
})
function handleLeetcode() {
_$('#question-title').then(questionTitleElement => {
const questionTitle = questionTitleElement.text().trim();
const questionId = parseInt(questionTitle);
if (!questionId) return;
if (!leetcode_to_algocasts[questionId]) return;
let algocastsId = leetcode_to_algocasts[questionId].id, algocastsLink = leetcode_to_algocasts[questionId].link;
_$('.css-101rr4k').then(element => {
element.append(`<div class="css-10o4wqw answers"><div diff="easy" class="css-14oi08n">解析</div><button class="btn__r7r7 css-1rdgofi answer-algocasts-${algocastsId}"><span>AlgoCasts ${algocastsId}</span></button></div>`)
$(`.answer-algocasts-${algocastsId}`).click(()=>{
console.log("Click")
window.open(algocastsLink);
});
})
})
}
function handleLeetcodeCN() {
_$('h4 a').then(questionTitleElement => {
const questionTitle = questionTitleElement.text().trim();
const questionId = parseInt(questionTitle);
console.log('questionTitle', questionTitle)
console.log('questionId', questionId)
if (!questionId) return;
if (!leetcode_to_algocasts[questionId]) return;
let algocastsId = leetcode_to_algocasts[questionId].id, algocastsLink = leetcode_to_algocasts[questionId].link;
_$('.css-nj515r-Tools').then(element => {
element.append(`<button id="answer-algocasts-${algocastsId}" class="css-1ey88ll-Button e5i1odf1">AlgoCasts ${algocastsId}</button>`)
$(`#answer-algocasts-${algocastsId}`).click(()=>{
console.log("Click")
window.open(algocastsLink);
});
})
})
}
(function() {
'use strict';
const host = window.location.host;
if (host === 'algocasts.io') handleAlgoCasts();
else if (host === 'leetcode.com') handleLeetcode();
else if (host === 'leetcode-cn.com') handleLeetcodeCN();
})();