✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% | LeetCode 题解
This report summarizes scanner evidence for halfrost/LeetCode-Go, a Go project with 33,816 GitHub stars. SynthScan examined 21,819,748 lines of code across 6146 source files, recording 147 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 0.0 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 133 finding(s).
Are imports declared and package/API names verified? 10 finding(s).
Are wrappers, guards, and repeated structures necessary? 7 finding(s).
Which changes need focused human review? 147 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 147 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gotest.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | leetcode/0069.Sqrtx/69. Sqrt(x).go | 21 | r = (r + x/r) / 2 | COMMENT |
| LOW | …de/0029.Divide-Two-Integers/29. Divide Two Integers.go | 21 | sign = 1 | COMMENT |
| LOW | leetcode/0729.My-Calendar-I/729. My Calendar I.go | 61 | // calendar := []Interval{} | COMMENT |
| LOW | leetcode/0729.My-Calendar-I/729. My Calendar I.go | 81 | // if pos != len(this.calendar)-1 && pos != -1 && this.calendar[pos].End <= start && this.calendar[pos+1].Start >= end | COMMENT |
| LOW | leetcode/0372.Super-Pow/372. Super Pow.go | 1 | package leetcode | COMMENT |
| LOW | leetcode/0715.Range-Module/715. Range Module.go | 81 | } | COMMENT |
| LOW | leetcode/0715.Range-Module/715. Range Module.go | 101 | // } | COMMENT |
| LOW | leetcode/0715.Range-Module/715. Range Module.go | 121 | // if root.Interval[0] <= interval[0] && interval[1] <= root.Interval[1] { | COMMENT |
| LOW | leetcode/0715.Range-Module/715. Range Module.go | 141 | // root.Right = delete(root.Right, []int{max(interval[0], root.Interval[1]+1), interval[1]}) | COMMENT |
| LOW | leetcode/0715.Range-Module/715. Range Module.go | 161 | // if root.Interval[0] < interval[0] && interval[1] < root.Interval[1] { | COMMENT |
| LOW | leetcode/0715.Range-Module/715. Range Module.go | 181 | // return query(root.Left, interval) | COMMENT |
| LOW | …airs-in-an-Array/532. K-diff Pairs in an Array_test.go | 61 | // para532{[]int{}, 5}, | COMMENT |
| LOW | …plicate-Substring/1044. Longest Duplicate Substring.go | 1 | package leetcode | COMMENT |
| LOW | …plicate-Substring/1044. Longest Duplicate Substring.go | 21 | // pl *= primeRK | COMMENT |
| LOW | …plicate-Substring/1044. Longest Duplicate Substring.go | 41 | COMMENT | |
| LOW | …e/0218.The-Skyline-Problem/218. The Skyline Problem.go | 181 | // {x: R , height: H , type: leaving}} | COMMENT |
| LOW | leetcode/0052.N-Queens-II/52. N-Queens II.go | 41 | // public: | COMMENT |
| LOW | leetcode/0052.N-Queens-II/52. N-Queens II.go | 61 | // } | COMMENT |
| LOW | …ge-Sum-Query-Mutable/307. Range Sum Query - Mutable.go | 21 | this.st.Update(i, val) | COMMENT |
| LOW | …ge-Sum-Query-Mutable/307. Range Sum Query - Mutable.go | 41 | // data[i] = nums[i] | COMMENT |
| LOW | …ge-Sum-Query-Mutable/307. Range Sum Query - Mutable.go | 61 | // return this.prefixSum[j] - this.prefixSum[i-1] | COMMENT |
| LOW | …um-Query-Immutable/303. Range Sum Query - Immutable.go | 21 | } | COMMENT |
| LOW | website/config.toml | 81 | name = "Weibo" | COMMENT |
| LOW | website/config.toml | 101 | BookTheme = 'light' | COMMENT |
| LOW | website/config.toml | 121 | # Used for 'Last Modified' and 'Edit this page' links. | COMMENT |
| LOW | website/config.toml | 141 | # (Optional, default true) Enables search function with flexsearch, | COMMENT |
| LOW | website/deploy/gitalk-oauth-worker.js | 1 | // Gitalk OAuth 代理 —— Cloudflare Worker 版 | COMMENT |
| LOW | …t.en/ChapterFour/0200~0299/0218.The-Skyline-Problem.md | 261 | // events = {{x: L , height: H , type: entering}, | COMMENT |
| LOW | …/content.en/ChapterFour/0700~0799/0715.Range-Module.md | 161 | // Left, Right *BSTNode | COMMENT |
| LOW | …/content.en/ChapterFour/0700~0799/0715.Range-Module.md | 181 | COMMENT | |
| LOW | …/content.en/ChapterFour/0700~0799/0715.Range-Module.md | 201 | // } | COMMENT |
| LOW | …/content.en/ChapterFour/0700~0799/0715.Range-Module.md | 221 | // root.Interval = pred.Interval | COMMENT |
| LOW | …/content.en/ChapterFour/0700~0799/0715.Range-Module.md | 241 | // func (this *RangeModule) query(root *BSTNode, interval []int) bool { | COMMENT |
| LOW | …content.en/ChapterFour/0700~0799/0729.My-Calendar-I.md | 121 | // calendar []Interval | COMMENT |
| LOW | …content.en/ChapterFour/0700~0799/0729.My-Calendar-I.md | 141 | // if pos == len(this.calendar)-1 && this.calendar[pos].End <= start { | COMMENT |
| LOW | …content.en/ChapterFour/0700~0799/0729.My-Calendar-I.md | 161 | // mid := low + ((high - low) >> 1) | COMMENT |
| LOW | …ite/content.en/ChapterFour/0300~0399/0372.Super-Pow.md | 41 | COMMENT | |
| LOW | …hapterFour/0300~0399/0303.Range-Sum-Query-Immutable.md | 81 | //Solution two prefixSum,sumRange time complexity O(1) | COMMENT |
| LOW | …/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable.md | 81 | // SumRange define | COMMENT |
| LOW | …/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable.md | 101 | // nums[i] += nums[i-1] | COMMENT |
| LOW | …/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable.md | 121 | // } | COMMENT |
| LOW | …t.en/ChapterFour/0001~0099/0029.Divide-Two-Integers.md | 81 | // if ((quotient+1)*abs(divisor) > abs(dividend) && quotient*abs(divisor) <= abs(dividend)) || ((quotient+1)*abs(divis | COMMENT |
| LOW | website/content.en/ChapterFour/0001~0099/0069.Sqrtx.md | 61 | r := x | COMMENT |
| LOW | …e/content.en/ChapterFour/0001~0099/0052.N-Queens-II.md | 81 | COMMENT | |
| LOW | …e/content.en/ChapterFour/0001~0099/0052.N-Queens-II.md | 101 | // cur-=curPos;//for next possible place | COMMENT |
| LOW | …pterFour/1000~1099/1044.Longest-Duplicate-Substring.md | 41 | // } else { | COMMENT |
| LOW | …pterFour/1000~1099/1044.Longest-Duplicate-Substring.md | 61 | // return hash | COMMENT |
| LOW | …tent/ChapterFour/0200~0299/0218.The-Skyline-Problem.md | 261 | // events = {{x: L , height: H , type: entering}, | COMMENT |
| LOW | …ite/content/ChapterFour/0700~0799/0715.Range-Module.md | 161 | // Left, Right *BSTNode | COMMENT |
| LOW | …ite/content/ChapterFour/0700~0799/0715.Range-Module.md | 181 | COMMENT | |
| LOW | …ite/content/ChapterFour/0700~0799/0715.Range-Module.md | 201 | // } | COMMENT |
| LOW | …ite/content/ChapterFour/0700~0799/0715.Range-Module.md | 221 | // root.Interval = pred.Interval | COMMENT |
| LOW | …ite/content/ChapterFour/0700~0799/0715.Range-Module.md | 241 | // func (this *RangeModule) query(root *BSTNode, interval []int) bool { | COMMENT |
| LOW | …te/content/ChapterFour/0700~0799/0729.My-Calendar-I.md | 121 | // calendar []Interval | COMMENT |
| LOW | …te/content/ChapterFour/0700~0799/0729.My-Calendar-I.md | 141 | // if pos == len(this.calendar)-1 && this.calendar[pos].End <= start { | COMMENT |
| LOW | …te/content/ChapterFour/0700~0799/0729.My-Calendar-I.md | 161 | // mid := low + ((high - low) >> 1) | COMMENT |
| LOW | website/content/ChapterFour/0300~0399/0372.Super-Pow.md | 41 | COMMENT | |
| LOW | …hapterFour/0300~0399/0303.Range-Sum-Query-Immutable.md | 81 | //解法二 prefixSum,sumRange 时间复杂度 O(1) | COMMENT |
| LOW | …/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable.md | 81 | // SumRange define | COMMENT |
| 26 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | website/config.toml | 174 | labels= "gitalk" # Github issue labels. If you used to use Gitment, you can change it | CODE |
| MEDIUM | website/public/zh/index.xml | 3883 | <description>424. Longest Repeating Character Replacement # 题目 # Given a string that consists of only uppercase | CODE |
| MEDIUM | website/public/zh/index.xml | 9015 | <description>1674. Minimum Moves to Make Array Complementary # 题目 # You are given an integer array nums of even | CODE |
| MEDIUM | website/public/zh/index.xml | 9349 | <description>1758. Minimum Changes To Make Alternating Binary String # 题目 # You are given a string s consisting | CODE |
| MEDIUM | website/public/zh/ChapterFour/1700~1799/index.xml | 192 | <description>1758. Minimum Changes To Make Alternating Binary String # 题目 # You are given a string s consisting | CODE |
| MEDIUM | …m-Changes-To-Make-Alternating-Binary-String/index.html | 30 | <meta name="description" content="1758. Minimum Changes To Make Alternating Binary String # 题目 # You are given a strin | CODE |
| MEDIUM | …m-Changes-To-Make-Alternating-Binary-String/index.html | 34 | <meta property="og:description" content="1758. Minimum Changes To Make Alternating Binary String # 题目 # You are given | CODE |
| MEDIUM | …erFour/0800~0899/0811.Subdomain-Visit-Count/index.html | 12208 | We only have one website domain: "discuss.leetcode.com". As discussed above, the subdomain "leetcode.com& | CODE |
| MEDIUM | website/public/zh/ChapterFour/1600~1699/index.xml | 384 | <description>1674. Minimum Moves to Make Array Complementary # 题目 # You are given an integer array nums of even | CODE |
| MEDIUM | …4.Minimum-Moves-to-Make-Array-Complementary/index.html | 30 | <meta name="description" content="1674. Minimum Moves to Make Array Complementary # 题目 # You are given an integer arra | CODE |
| MEDIUM | …4.Minimum-Moves-to-Make-Array-Complementary/index.html | 33 | <meta property="og:description" content="1674. Minimum Moves to Make Array Complementary # 题目 # You are given an integ | CODE |
| MEDIUM | website/public/zh/ChapterFour/0400~0499/index.xml | 194 | <description>424. Longest Repeating Character Replacement # 题目 # Given a string that consists of only uppercase | CODE |
| MEDIUM | …424.Longest-Repeating-Character-Replacement/index.html | 30 | <meta name="description" content="424. Longest Repeating Character Replacement # 题目 # Given a string that consists of | CODE |
| MEDIUM | …424.Longest-Repeating-Character-Replacement/index.html | 36 | <meta property="og:description" content="424. Longest Repeating Character Replacement # 题目 # Given a string that consi | CODE |
| MEDIUM | website/public/en/index.xml | 3799 | <description>424. Longest Repeating Character Replacement # Problem # Given a string that consists of only upper | CODE |
| MEDIUM | website/public/en/index.xml | 8928 | <description>1674. Minimum Moves to Make Array Complementary # Problem # You are given an integer array nums of | CODE |
| MEDIUM | website/public/en/index.xml | 9262 | <description>1758. Minimum Changes To Make Alternating Binary String # Problem # You are given a string s consis | CODE |
| MEDIUM | website/public/en/ChapterFour/1700~1799/index.xml | 192 | <description>1758. Minimum Changes To Make Alternating Binary String # Problem # You are given a string s consis | CODE |
| MEDIUM | …m-Changes-To-Make-Alternating-Binary-String/index.html | 30 | <meta name="description" content="1758. Minimum Changes To Make Alternating Binary String # Problem # You are given a | CODE |
| MEDIUM | …m-Changes-To-Make-Alternating-Binary-String/index.html | 34 | <meta property="og:description" content="1758. Minimum Changes To Make Alternating Binary String # Problem # You are g | CODE |
| MEDIUM | …erFour/0800~0899/0811.Subdomain-Visit-Count/index.html | 12208 | We only have one website domain: "discuss.leetcode.com". As discussed above, the subdomain "leetcode.com& | CODE |
| MEDIUM | website/public/en/ChapterFour/1600~1699/index.xml | 384 | <description>1674. Minimum Moves to Make Array Complementary # Problem # You are given an integer array nums of | CODE |
| MEDIUM | …4.Minimum-Moves-to-Make-Array-Complementary/index.html | 30 | <meta name="description" content="1674. Minimum Moves to Make Array Complementary # Problem # You are given an integer | CODE |
| MEDIUM | …4.Minimum-Moves-to-Make-Array-Complementary/index.html | 33 | <meta property="og:description" content="1674. Minimum Moves to Make Array Complementary # Problem # You are given an | CODE |
| MEDIUM | website/public/en/ChapterFour/0400~0499/index.xml | 194 | <description>424. Longest Repeating Character Replacement # Problem # Given a string that consists of only upper | CODE |
| MEDIUM | …424.Longest-Repeating-Character-Replacement/index.html | 30 | <meta name="description" content="424. Longest Repeating Character Replacement # Problem # Given a string that consist | CODE |
| MEDIUM | …424.Longest-Repeating-Character-Replacement/index.html | 36 | <meta property="og:description" content="424. Longest Repeating Character Replacement # Problem # Given a string that | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | website/public/zh/index.xml | 7025 | <description>981. Time Based Key-Value Store # 题目 # Create a timebased key-value store class TimeMap, that suppo | CODE |
| MEDIUM | website/public/zh/ChapterFour/0900~0999/index.xml | 491 | <description>981. Time Based Key-Value Store # 题目 # Create a timebased key-value store class TimeMap, that suppo | CODE |
| MEDIUM | …r/0900~0999/0981.Time-Based-Key-Value-Store/index.html | 30 | <meta name="description" content="981. Time Based Key-Value Store # 题目 # Create a timebased key-value store class Time | CODE |
| MEDIUM | …r/0900~0999/0981.Time-Based-Key-Value-Store/index.html | 35 | <meta property="og:description" content="981. Time Based Key-Value Store # 题目 # Create a timebased key-value store cla | CODE |
| MEDIUM | website/public/en/index.xml | 6941 | <description>981. Time Based Key-Value Store # Problem # Create a timebased key-value store class TimeMap, that | CODE |
| MEDIUM | website/public/en/ChapterFour/0900~0999/index.xml | 491 | <description>981. Time Based Key-Value Store # Problem # Create a timebased key-value store class TimeMap, that | CODE |
| MEDIUM | …r/0900~0999/0981.Time-Based-Key-Value-Store/index.html | 30 | <meta name="description" content="981. Time Based Key-Value Store # Problem # Create a timebased key-value store class | CODE |
| MEDIUM | …r/0900~0999/0981.Time-Based-Key-Value-Store/index.html | 35 | <meta property="og:description" content="981. Time Based Key-Value Store # Problem # Create a timebased key-value stor | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | website/sw-src/serviceworker.js | 34 | // ─────────────── 预缓存(app shell) ─────────────── | COMMENT |
| MEDIUM | website/sw-src/serviceworker.js | 41 | // ─────────────── 运行时路由 ─────────────── | COMMENT |
| MEDIUM | website/public/serviceworker-v1.min.js | 34 | // ─────────────── 预缓存(app shell) ─────────────── | COMMENT |
| MEDIUM | website/public/serviceworker-v1.min.js | 41 | // ─────────────── 运行时路由 ─────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | website/content/ChapterFour/pytool/AddTOC.py | 2 | CODE | |
| LOW | website/content/ChapterFour/pytool/AddTOC.py | 3 | CODE | |
| LOW | website/content/ChapterFour/pytool/GenerateOne.py | 2 | CODE | |
| LOW | website/content/ChapterFour/pytool/GenerateOne.py | 3 | CODE | |
| LOW | website/content/ChapterFour/pytool/CutContent.py | 2 | CODE | |
| LOW | website/public/zh/ChapterFour/pytool/AddTOC.py | 2 | CODE | |
| LOW | website/public/zh/ChapterFour/pytool/AddTOC.py | 3 | CODE | |
| LOW | website/public/zh/ChapterFour/pytool/GenerateOne.py | 2 | CODE | |
| LOW | website/public/zh/ChapterFour/pytool/GenerateOne.py | 3 | CODE | |
| LOW | website/public/zh/ChapterFour/pytool/CutContent.py | 2 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …book/exampleSite/content/posts/creating-a-new-theme.md | 21 | In this tutorial, commands that you enter will start with the "$" prompt. The output will follow. Lines that start with | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …Four/0700~0799/0784.Letter-Case-Permutation/index.html | 12278 | </span><span style="color:#75715e">// Step 1: | CODE |
| LOW⚡ | …Four/0700~0799/0784.Letter-Case-Permutation/index.html | 12280 | </span><span style="color:#75715e">// Step 2: | CODE |
| LOW⚡ | …Four/0700~0799/0784.Letter-Case-Permutation/index.html | 12282 | </span><span style="color:#75715e">// Step 2: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | website/public/en/index.xml | 800 | Solution Approach # To find all permutations among the permutations and combinations of an array, simply use DFS. Cod | CODE |
| LOW | website/public/en/ChapterFour/0001~0099/index.xml | 551 | Solution Approach # To find all permutations among the permutations and combinations of an array, simply use DFS. Cod | CODE |
| LOW | …/en/ChapterFour/0001~0099/0046.Permutations/index.html | 33 | Solution Approach # To find all permutations among the permutations and combinations of an array, simply use DFS. Cod | CODE |
| LOW | …/en/ChapterFour/0001~0099/0046.Permutations/index.html | 38 | Solution Approach # To find all permutations among the permutations and combinations of an array, simply use DFS. Cod | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …c8ad6327488282266c11589d9483728ec07a9653194baa463ff.js | 2 | input.addEventListener('focus',init);input.addEventListener('keyup',search);document.addEventListener('keypress',focusSe | CODE |
| LOW | …2be973e5deb120ed9fe048908cea71f272abe7c617f21c06caa.js | 2 | input.addEventListener('focus',init);input.addEventListener('keyup',search);document.addEventListener('keypress',focusSe | CODE |
| LOW | website/themes/book/assets/search.js | 22 | function focusSearchFieldOnKeyPress(event) { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …le/1178. Number of Valid Words for Each Puzzle_test.go | 22 | // TODO: Add test cases. | COMMENT |