Leetcode solutions
This report summarizes scanner evidence for neetcode-gh/leetcode, a JavaScript project with 6,505 GitHub stars. SynthScan examined 926,818 lines of code across 4664 source files, recording 170 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 0.3 (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? 122 finding(s).
Are imports declared and package/API names verified? 5 finding(s).
Are wrappers, guards, and repeated structures necessary? 52 finding(s).
Which changes need focused human review? 170 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 170 distinct pattern matches across 14 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 |
|---|---|---|---|---|
| MEDIUM | python/0377-combination-sum-iv.py | 11 | CODE | |
| MEDIUM | python/0377-combination-sum-iv.py | 24 | CODE | |
| MEDIUM | python/0474-ones-and-zeroes.py | 16 | CODE | |
| MEDIUM | python/0474-ones-and-zeroes.py | 18 | CODE | |
| MEDIUM | python/0474-ones-and-zeroes.py | 32 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 26 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 27 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 28 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 33 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 38 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 39 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 40 | CODE | |
| MEDIUM | python/0518-coin-change-ii.py | 49 | CODE | |
| MEDIUM | python/0091-decode-ways.py | 23 | CODE | |
| MEDIUM | python/0091-decode-ways.py | 24 | CODE | |
| MEDIUM | python/0091-decode-ways.py | 34 | CODE | |
| MEDIUM | python/0496-next-greater-element-i.py | 25 | CODE | |
| MEDIUM | python/0496-next-greater-element-i.py | 26 | CODE | |
| MEDIUM | python/0496-next-greater-element-i.py | 28 | CODE | |
| MEDIUM | python/0496-next-greater-element-i.py | 37 | CODE | |
| MEDIUM | python/0516-longest-palindromic-subsequence.py | 23 | CODE | |
| MEDIUM | python/0516-longest-palindromic-subsequence.py | 25 | CODE | |
| MEDIUM | python/0516-longest-palindromic-subsequence.py | 38 | CODE | |
| MEDIUM | python/0516-longest-palindromic-subsequence.py | 42 | CODE | |
| MEDIUM | python/0673-number-of-longest-increasing-subsequence.py | 34 | CODE | |
| MEDIUM | python/0673-number-of-longest-increasing-subsequence.py | 35 | CODE | |
| MEDIUM | python/0673-number-of-longest-increasing-subsequence.py | 38 | CODE | |
| MEDIUM | python/0673-number-of-longest-increasing-subsequence.py | 54 | CODE | |
| MEDIUM | python/0063-unique-paths-ii.py | 18 | CODE | |
| MEDIUM | python/0063-unique-paths-ii.py | 19 | CODE | |
| MEDIUM | python/0063-unique-paths-ii.py | 21 | CODE | |
| MEDIUM | python/0063-unique-paths-ii.py | 28 | CODE | |
| MEDIUM | python/0094-binary-tree-inorder-traversal.py | 17 | CODE | |
| MEDIUM | python/0094-binary-tree-inorder-traversal.py | 19 | CODE | |
| MEDIUM | python/0094-binary-tree-inorder-traversal.py | 26 | CODE | |
| MEDIUM | python/0094-binary-tree-inorder-traversal.py | 27 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | go/0206-reverse-linked-list.go | 21 | // var prev *ListNode | COMMENT |
| LOW | python/0215-kth-largest-element-in-an-array.py | 1 | # Solution: Sorting | COMMENT |
| LOW | python/0707-design-linked-list.py | 61 | # Your MyLinkedList object will be instantiated and called as such: | COMMENT |
| LOW | python/0705-design-hashset.py | 21 | # obj.remove(key) | COMMENT |
| LOW | python/0338-counting-bits.py | 21 | return res | COMMENT |
| LOW | articles/linked-list-cycle-ii.md | 561 | // With owned Box<ListNode>, cycles cannot form in safe Rust. | COMMENT |
| LOW | articles/print-immutable-linked-list-in-reverse.md | 281 | while !stack.isEmpty { | COMMENT |
| LOW | articles/print-immutable-linked-list-in-reverse.md | 641 | ``` | COMMENT |
| LOW | articles/print-immutable-linked-list-in-reverse.md | 661 | // size | COMMENT |
| LOW | articles/print-immutable-linked-list-in-reverse.md | 941 | } | COMMENT |
| LOW | articles/print-immutable-linked-list-in-reverse.md | 961 | // slow = slow.and_then(|n| n.get_next()); | COMMENT |
| LOW | articles/print-immutable-linked-list-in-reverse.md | 1141 | COMMENT | |
| LOW | articles/linked-list-cycle-detection.md | 521 | impl Solution { | COMMENT |
| LOW | articles/construct-quad-tree.md | 501 | // fn dfs(grid: &Vec<Vec<i32>>, n: usize, r: usize, c: usize) -> Option<Box<Node>> { | COMMENT |
| LOW | articles/construct-quad-tree.md | 1021 | // let mid = n / 2; | COMMENT |
| LOW | articles/construct-quad-tree.md | 1561 | // return Some(Box::new(Node::new(grid[r][c] == 1, true, | COMMENT |
| LOW | articles/construct-quad-tree.md | 1581 | // None, None, None, None))); | COMMENT |
| LOW | java/0060-permutation-sequence.java | 21 | } | COMMENT |
| LOW | java/0060-permutation-sequence.java | 41 | // while (pivot>0 && nums[pivot]<nums[pivot-1]) { | COMMENT |
| LOW | java/0060-permutation-sequence.java | 61 | // end--; | COMMENT |
| LOW | java/0094-binary-tree-inorder-traversal.java | 21 | COMMENT | |
| LOW | cpp/0347-top-k-frequent-elements.cpp | 1 | /* | COMMENT |
| LOW | cpp/0347-top-k-frequent-elements.cpp | 21 | // if (pq.size() > k) { | COMMENT |
| LOW | cpp/0138-copy-list-with-random-pointer.cpp | 21 | val = _val; | COMMENT |
| LOW | cpp/0138-copy-list-with-random-pointer.cpp | 41 | // newNode = newNode->next; | COMMENT |
| LOW | cpp/0138-copy-list-with-random-pointer.cpp | 101 | }; | COMMENT |
| LOW | cpp/0050-powx-n.cpp | 21 | // private: | COMMENT |
| LOW | …235-lowest-common-ancestor-of-a-binary-search-tree.cpp | 41 | // } else { | COMMENT |
| LOW | cpp/0023-merge-k-sorted-lists.cpp | 21 | COMMENT | |
| LOW | cpp/0072-edit-distance.cpp | 41 | // min(replace, delete, insert) + 1 <-- since an op was needed | COMMENT |
| LOW | cpp/0072-edit-distance.cpp | 61 | // } | COMMENT |
| LOW | cpp/0098-validate-binary-search-tree.cpp | 81 | // stack<TreeNode*> stk; | COMMENT |
| LOW | cpp/0098-validate-binary-search-tree.cpp | 101 | // } | COMMENT |
| LOW | cpp/0215-kth-largest-element-in-an-array.cpp | 81 | // int p_pos = l; | COMMENT |
| LOW | csharp/0297-serialize-and-deserialize-binary-tree.cs | 61 | } | COMMENT |
| LOW | javascript/2704-to-be-or-not-to-be.js | 21 | // expect(5).notToBe(3); // returns true | COMMENT |
| LOW | …cript/0448-find-all-numbers-disappeared-in-an-array.js | 41 | // For each value in the array mark its presence by making the number negative at that place in array | COMMENT |
| LOW | c/0691-stickers-to-spell-word.c | 221 | search(mapping, stickerSignatures, targetSignature, 0, &maxDepth); | COMMENT |
| LOW | c/0691-stickers-to-spell-word.c | 241 | // int new_mask = 0; | COMMENT |
| LOW | c/0691-stickers-to-spell-word.c | 261 | // for (int i = 0; i < (1 << m); i++) { | COMMENT |
| LOW | c/0128-longest-consecutive-sequence.c | 81 | } | COMMENT |
| LOW | c/0128-longest-consecutive-sequence.c | 101 | // } | COMMENT |
| LOW | c/0128-longest-consecutive-sequence.c | 121 | // len++; | COMMENT |
| LOW | c/0128-longest-consecutive-sequence.c | 141 | // } | COMMENT |
| LOW | c/1838-frequency-of-the-most-frequent-element.c | 1 | int greater(const void *a, const void *b) { | COMMENT |
| LOW | ruby/0094-binary-tree-inorder-traversal.rb | 1 | # Definition for a binary tree node. | COMMENT |
| LOW | ruby/0138-copy-list-with-random-pointer.rb | 1 | # Definition for Node. | COMMENT |
| LOW | ruby/0002-add-two-numbers.rb | 1 | # Definition for singly-linked list. | COMMENT |
| LOW | ruby/0102-binary-tree-level-order-traversal.rb | 1 | # Definition for a binary tree node. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/0438-find-all-anagrams-in-a-string.py | 2 | CODE | |
| LOW | python/0735-asteroid-collision.py | 2 | CODE | |
| LOW | …-first-and-last-position-of-element-in-sorted-array.py | 8 | CODE | |
| LOW | python/0838-push-dominoes.py | 2 | CODE | |
| LOW | python/0241-different-ways-to-add-parentheses.py | 2 | CODE | |
| LOW | python/0241-different-ways-to-add-parentheses.py | 3 | CODE | |
| LOW | python/0745-prefix-and-suffix-search.py | 8 | CODE | |
| LOW | python/0081-search-in-rotated-sorted-array-ii.py | 2 | CODE | |
| LOW | python/2101-detonate-the-maximum-bombs.py | 2 | CODE | |
| LOW | python/2709-greatest-common-divisor-traversal.py | 25 | CODE | |
| LOW | python/0018-4sum.py | 2 | CODE | |
| LOW | python/0018-4sum.py | 3 | CODE | |
| LOW | python/0041-first-missing-positive.py | 2 | CODE | |
| LOW | python/0994-rotting-oranges.py | 2 | CODE | |
| LOW | python/1345-jump-game-iv.py | 8 | CODE | |
| LOW | python/0010-regular-expression-matching.py | 3 | CODE | |
| LOW | python/2306-naming-a-company.py | 3 | CODE | |
| LOW | …1475-final-prices-with-a-special-discount-in-a-shop.py | 2 | CODE | |
| LOW | python/1609-even-odd-tree.py | 2 | CODE | |
| LOW | python/0150-evaluate-reverse-polish-notation.py | 2 | CODE | |
| LOW | python/0682-baseball-game.py | 2 | CODE | |
| LOW | python/0127-word-ladder.py | 2 | CODE | |
| LOW | …hon/0211-design-add-and-search-words-data-structure.py | 19 | CODE | |
| LOW | …hon/0211-design-add-and-search-words-data-structure.py | 20 | CODE | |
| LOW | python/1631-path-with-minimum-effort.py | 2 | CODE | |
| LOW | python/0516-longest-palindromic-subsequence.py | 3 | CODE | |
| LOW | python/0450-delete-node-in-a-bst.py | 8 | CODE | |
| LOW | python/0785-is-graph-bipartite.py | 2 | CODE | |
| LOW | python/0073-set-matrix-zeroes.py | 2 | CODE | |
| LOW | python/0673-number-of-longest-increasing-subsequence.py | 2 | CODE | |
| LOW | python/0673-number-of-longest-increasing-subsequence.py | 8 | CODE | |
| LOW | python/0063-unique-paths-ii.py | 2 | CODE | |
| LOW | python/0846-hand-of-straights.py | 2 | CODE | |
| LOW | python/0016-3sum-closest.py | 2 | CODE | |
| LOW | python/0953-verifying-an-alien-dictionary.py | 2 | CODE | |
| LOW | python/0068-text-justification.py | 2 | CODE | |
| LOW | python/0015-3sum.py | 2 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/0283-move-zeroes.py | 0 | do not return anything, modify nums in-place instead. | STRING |
| HIGH | python/0189-rotate-array.py | 0 | do not return anything, modify nums in-place instead. | STRING |
| HIGH | articles/sort-colors.md | 0 | do not return anything, modify nums in-place instead. | STRING |
| HIGH | articles/next-permutation.md | 0 | do not return anything, modify nums in-place instead. | STRING |
| HIGH | articles/wiggle-sort.md | 0 | do not return anything, modify nums in-place instead. | STRING |
| HIGH | articles/rotate-array.md | 0 | do not return anything, modify nums in-place instead. | STRING |
| HIGH | articles/move-zeroes.md | 0 | do not return anything, modify nums in-place instead. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | typescript/0208-implement-trie-prefix-tree.ts | 57 | trie.search('apple'); // return True | CODE |
| HIGH⚡ | typescript/0208-implement-trie-prefix-tree.ts | 58 | trie.search('app'); // return False | CODE |
| HIGH⚡ | typescript/0208-implement-trie-prefix-tree.ts | 59 | trie.startsWith('app'); // return True | CODE |
| HIGH⚡ | typescript/0208-implement-trie-prefix-tree.ts | 61 | trie.search('app'); // return True | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 22 | # Step 1: Assign unique group IDs to items that don't belong to any group | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 28 | # Step 2: Initialize graphs for item dependencies and group dependencies | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 32 | # Step 3: Build the dependency graphs based on beforeItems | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 45 | # Step 4: Perform topological sort on both the group dependencies and item dependencies | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 49 | # Step 5: If there was a cycle detected in either group or item sorting, return an empty list | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 53 | # Step 6: Group the items based on the group IDs | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 58 | # Step 7: Combine the groups in topologically sorted order | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 22 | # Step 1: Assign unique group IDs to items that don't belong to any group | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 28 | # Step 2: Initialize graphs for item dependencies and group dependencies | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 32 | # Step 3: Build the dependency graphs based on beforeItems | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 45 | # Step 4: Perform topological sort on both the group dependencies and item dependencies | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 49 | # Step 5: If there was a cycle detected in either group or item sorting, return an empty list | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 53 | # Step 6: Group the items based on the group IDs | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 58 | # Step 7: Combine the groups in topologically sorted order | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/0930-binary-subarrays-with-sum.py | 4 | def helper(x): | CODE |
| LOW | python/0005-longest-palindromic-substring.py | 11 | def helper(self, s, left, right): | CODE |
| LOW | python/0213-house-robber-ii.py | 5 | def helper(self, nums): | CODE |
| LOW | python/0050-powx-n.py | 3 | def helper(x, n): | CODE |
| LOW | python/0077-combinations.py | 4 | def helper(start, comb): | CODE |
| LOW | python/0221-maximal-square.py | 6 | def helper(r, c): | CODE |
| LOW | python/0094-binary-tree-inorder-traversal.py | 19 | def helper(root): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …cript/1930-unique-length-3-palindromic-subsequences.ts | 1 | function countPalindromicSubsequence(s: string): number { | CODE |
| LOW | …-and-pseudo-critical-edges-in-minimum-spanning-tree.ts | 77 | function findCriticalAndPseudoCriticalEdges( | CODE |
| LOW | typescript/0472-concatenated-words.ts | 1 | function findAllConcatenatedWordsInADict(words: string[]): string[] { | CODE |
| LOW | articles/largest-bst-subtree.md | 1164 | def largest_bst_subtree_helper(self, root): | CODE |
| LOW | articles/two-sum-bsts.md | 1252 | def reversed_morris_traversal(root): | CODE |
| LOW | articles/cross-entropy-loss.md | 53 | def categorical_cross_entropy(self, y_true: NDArray[np.float64], y_pred: NDArray[np.float64]) -> float: | CODE |
| LOW | …0003-longest-substring-without-repeating-characters.rb | 1 | def length_of_longest_substring(s) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/0745-prefix-and-suffix-search.py | 17 | # Create the key as suffix + '{' + prefix | COMMENT |
| MEDIUM⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 54 | items_grouped = [[] for _ in range(m)] # Create an empty list for each group to store its items | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/0135-candy.py | 9 | # Check if current rating is greater than left neighbor | COMMENT |
| LOW | python/0135-candy.py | 16 | # Check if current rating is greater than right neighbor | COMMENT |
| LOW⚡ | …n/1203-sort-items-by-groups-respecting-dependencies.py | 16 | nodes_with_no_predecessors.append(successor) # Add it to the queue for processing | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/0071-simplify-path.py | 19 | CODE | |
| LOW | python/1905-count-sub-islands.py | 26 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | javascript/2704-to-be-or-not-to-be.js | 19 | // Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …n/1203-sort-items-by-groups-respecting-dependencies.py | 1 | CODE |