🏋️ Python / Modern C++ Solutions of All 3991 LeetCode Problems (Weekly Update)
This report presents the forensic synthetic code analysis of kamyu104/LeetCode-Solutions, a C++ project with 5,885 GitHub stars. SynthScan v2.0 examined 328,625 lines of code across 7596 source files, recording 1319 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 8.7 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1319 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | Python/online-majority-element-in-subarray.py | 0 | initialize your data structure here. :type nums: list[int] | STRING |
| HIGH | Python/falling-squares.py | 0 | initialize your data structure here. :type nums: list[int] | STRING |
| HIGH | Python/range-sum-query-immutable.py | 0 | initialize your data structure here. :type nums: list[int] | STRING |
| HIGH | Python/range-sum-query-mutable.py | 0 | initialize your data structure here. :type nums: list[int] | STRING |
| HIGH | Python/count-the-number-of-fair-pairs.py | 0 | :type nums: list[int] :type lower: int :type upper: int :rtype: list[str] | STRING |
| HIGH | Python/count-of-range-sum.py | 0 | :type nums: list[int] :type lower: int :type upper: int :rtype: list[str] | STRING |
| HIGH | Python/missing-ranges.py | 0 | :type nums: list[int] :type lower: int :type upper: int :rtype: list[str] | STRING |
| HIGH | Python/count-stable-subarrays.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/maximum-xor-with-an-element-from-array.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/maximum-xor-score-subarray-queries.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …ents-in-array-after-removing-and-replacing-elements.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/peaks-in-array.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/mark-elements-on-array-by-performing-queries.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/range-xor-queries-with-subarray-reversals.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/maximize-count-of-distinct-primes-after-split.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/minimum-absolute-difference-queries.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/threshold-majority-queries.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …smallest-remaining-even-integer-in-subarray-queries.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …umber-of-integers-with-popcount-depth-equal-to-k-ii.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/minimum-cost-to-move-between-indices.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …thon/sum-of-special-evenly-spaced-elements-in-array.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/reachable-nodes-in-subdivided-graph.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/top-k-frequent-elements.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/k-radius-subarray-averages.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/sliding-window-maximum.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/find-the-most-competitive-subsequence.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/find-the-power-of-k-size-subarrays-i.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/rotate-non-negative-elements.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/find-the-power-of-k-size-subarrays-ii.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/find-x-value-of-array-i.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …n/smallest-subarray-to-sort-in-every-sliding-window.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …n/find-subsequence-of-length-k-with-the-largest-sum.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/maximize-sum-of-at-most-k-distinct-elements.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/reverse-k-subarrays.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/largest-subarray-length-k.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/distinct-numbers-in-each-subarray.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/concatenated-divisibility.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/delayed-count-of-equal-elements.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/limit-occurrences-in-sorted-array.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/maximum-sum-of-3-non-overlapping-subarrays.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/find-all-good-indices.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …divide-an-array-into-subarrays-with-minimum-cost-ii.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/minimum-time-for-k-connected-components.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/minimize-maximum-component-cost.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …thon/maximize-spanning-tree-stability-with-upgrades.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …on/minimum-cost-to-repair-edges-to-traverse-a-graph.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/zero-array-transformation-i.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/maximum-xor-of-two-non-overlapping-subtrees.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …max-number-of-edges-to-keep-graph-fully-traversable.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/find-champion-ii.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/count-the-number-of-complete-components.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …inimum-distance-excluding-one-maximum-weighted-edge.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/maximum-sum-of-edge-values-in-a-graph.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …minimum-time-to-reach-destination-in-directed-graph.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/minimum-cost-path-with-edge-reversals.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/incremental-even-weighted-cycle-queries.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/count-valid-paths-in-a-tree.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | Python/minimum-degree-of-a-connected-trio-in-a-graph.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …t-unreachable-pairs-of-nodes-in-an-undirected-graph.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| HIGH | …mber-of-connected-components-in-an-undirected-graph.py | 0 | :type n: int :type edges: list[list[int]] :type hasapple: list[bool] :rtype: int | STRING |
| 300 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Python/find-the-grid-of-region-average.py | 6 | CODE | |
| LOW | Python/finding-3-digit-even-numbers.py | 38 | CODE | |
| LOW | Python/check-if-word-can-be-placed-in-crossword.py | 5 | CODE | |
| LOW | Python/check-if-word-can-be-placed-in-crossword.py | 40 | CODE | |
| LOW | Python/time-taken-to-mark-all-nodes.py | 6 | CODE | |
| LOW | Python/time-taken-to-mark-all-nodes.py | 11 | CODE | |
| LOW | Python/time-taken-to-mark-all-nodes.py | 30 | CODE | |
| LOW | …er-of-flips-to-convert-binary-matrix-to-zero-matrix.py | 8 | CODE | |
| LOW | Python/maximum-manhattan-distance-after-k-changes.py | 6 | CODE | |
| LOW | …hon/longest-path-with-different-adjacent-characters.py | 9 | CODE | |
| LOW | …hon/longest-path-with-different-adjacent-characters.py | 49 | CODE | |
| LOW | …hon/longest-path-with-different-adjacent-characters.py | 15 | CODE | |
| LOW | …hon/longest-path-with-different-adjacent-characters.py | 55 | CODE | |
| LOW | Python/count-all-possible-routes.py | 8 | CODE | |
| LOW | Python/count-all-possible-routes.py | 54 | CODE | |
| LOW | …/build-binary-expression-tree-from-infix-expression.py | 13 | CODE | |
| LOW | …on/maximize-the-distance-between-points-on-a-square.py | 6 | CODE | |
| LOW | …on/maximize-the-distance-between-points-on-a-square.py | 57 | CODE | |
| LOW | …on/maximize-the-distance-between-points-on-a-square.py | 115 | CODE | |
| LOW | …on/maximize-the-distance-between-points-on-a-square.py | 165 | CODE | |
| LOW | …on/maximize-the-distance-between-points-on-a-square.py | 22 | CODE | |
| LOW | …on/maximize-the-distance-between-points-on-a-square.py | 73 | CODE | |
| LOW | Python/sum-of-remoteness-of-all-cells.py | 6 | CODE | |
| LOW | Python/sum-of-remoteness-of-all-cells.py | 12 | CODE | |
| LOW | Python/maximum-xor-of-two-non-overlapping-subtrees.py | 33 | CODE | |
| LOW | Python/maximum-xor-of-two-non-overlapping-subtrees.py | 40 | CODE | |
| LOW | Python/maximum-xor-of-two-non-overlapping-subtrees.py | 55 | CODE | |
| LOW | …/maximum-number-of-subsequences-after-one-inserting.py | 6 | CODE | |
| LOW | …imum-operations-to-form-subsequence-with-target-sum.py | 7 | CODE | |
| LOW | …max-number-of-edges-to-keep-graph-fully-traversable.py | 24 | CODE | |
| LOW | Python/word-squares-ii.py | 9 | CODE | |
| LOW | Python/word-squares-ii.py | 38 | CODE | |
| LOW | Python/search-in-rotated-sorted-array-ii.py | 5 | CODE | |
| LOW | Python/count-of-integers.py | 6 | CODE | |
| LOW | Python/count-of-integers.py | 15 | CODE | |
| LOW | Python/maximum-compatibility-score-sum.py | 9 | CODE | |
| LOW | Python/maximum-compatibility-score-sum.py | 17 | CODE | |
| LOW | Python/minimum-xor-sum-of-two-arrays.py | 6 | CODE | |
| LOW | Python/minimum-xor-sum-of-two-arrays.py | 9 | CODE | |
| LOW | Python/max-points-on-a-line.py | 14 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 6 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 87 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 134 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 15 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 96 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 143 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 16 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 97 | CODE | |
| LOW | Python/find-minimum-diameter-after-merging-two-trees.py | 144 | CODE | |
| LOW | Python/word-pattern-ii.py | 17 | CODE | |
| LOW | …n/count-non-decreasing-arrays-with-given-digit-sums.py | 23 | CODE | |
| LOW | Python/swap-adjacent-in-lr-string.py | 9 | CODE | |
| LOW | Python/maximum-number-of-fish-in-a-grid.py | 6 | CODE | |
| LOW | Python/maximum-number-of-fish-in-a-grid.py | 12 | CODE | |
| LOW | Python/sparse-matrix-multiplication.py | 5 | CODE | |
| LOW | Python/count-palindromic-subsequences.py | 36 | CODE | |
| LOW | Python/strings-differ-by-one-character.py | 8 | CODE | |
| LOW | Python/walking-robot-simulation.py | 5 | CODE | |
| LOW | Python/string-compression-ii.py | 5 | CODE | |
| LOW | …the-lexicographically-largest-string-from-the-box-i.py | 6 | CODE | |
| 702 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | Python/find-the-index-of-the-large-integer.py | 17 | left, right = 0, reader.length()-1 | CODE |
| HIGH | Python/guess-the-majority-in-a-hidden-array.py | 27 | for i in reversed(xrange(4, reader.length())): | CODE |
| HIGH | Python/implement-stack-using-queues.py | 35 | self.q_.push(x) | CODE |
| HIGH | Python/implement-stack-using-queues.py | 37 | self.q_.push(self.q_.pop()) | CODE |
| HIGH | Python/implement-stack-using-queues.py | 63 | self.q_.push(x) | CODE |
| HIGH | Python/implement-stack-using-queues.py | 70 | self.q_.push(self.top_) | CODE |
| HIGH⚡ | Python/find-in-mountain-array.py | 39 | peak = binarySearch(mountain_arr, 0, mountain_arr.length()-1, | CODE |
| HIGH⚡ | Python/find-in-mountain-array.py | 45 | right = binarySearch(mountain_arr, peak, mountain_arr.length()-1, | CODE |
| HIGH⚡ | Python/find-in-mountain-array.py | 47 | if right <= mountain_arr.length()-1 and mountain_arr.get(right) == target: | CODE |
| HIGH⚡ | Python/invert-binary-tree.py | 40 | nodes.push(root) | CODE |
| HIGH⚡ | Python/invert-binary-tree.py | 45 | nodes.push(node.left) | CODE |
| HIGH⚡ | Python/invert-binary-tree.py | 47 | nodes.push(node.right) | CODE |
| HIGH | …perations-to-make-elements-within-k-subarrays-equal.py | 142 | self.left.push(val) | CODE |
| HIGH | …perations-to-make-elements-within-k-subarrays-equal.py | 145 | self.right.push(val) | CODE |
| HIGH | …perations-to-make-elements-within-k-subarrays-equal.py | 162 | self.left.push(self.right.top()) | CODE |
| HIGH | …perations-to-make-elements-within-k-subarrays-equal.py | 167 | self.right.push(self.left.top()) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | C++/encode-n-ary-tree-to-binary-tree.cpp | 81 | // Your Codec object will be instantiated and called as such: | COMMENT |
| LOW | C++/subtree-removal-game-with-fibonacci-tree.cpp | 1 | // Time: O(1) | COMMENT |
| LOW | C++/subsequences-with-a-unique-middle-mode-ii.cpp | 41 | result += nC2(l) * nC2(r); | COMMENT |
| LOW | C++/pizza-with-3n-slices.cpp | 1 | // Time: O(n^2) | COMMENT |
| LOW | C++/sum-of-all-odd-length-subarrays.cpp | 1 | // Time: O(n) | COMMENT |
| LOW | C++/smallest-all-ones-multiple.cpp | 1 | // Time: O(k) | COMMENT |
| LOW | C++/lowest-common-ancestor-of-a-binary-tree.cpp | 21 | // 1. If the current subtree contains both p and q, | COMMENT |
| LOW | C++/airplane-seat-assignment-probability.cpp | 1 | // Time: O(1) | COMMENT |
| LOW | C++/clumsy-factorial.cpp | 1 | // Time: O(1) | COMMENT |
| LOW | C++/smallest-integer-divisible-by-k.cpp | 1 | // Time: O(k) | COMMENT |
| LOW | C++/minimum-knight-moves.cpp | 21 | // [2,(1),4] | COMMENT |
| LOW | C++/divisor-game.cpp | 1 | // Time: O(1) | COMMENT |
| LOW | C++/cat-and-mouse-ii.cpp | 201 | q1.emplace(ni, nj, nt); | COMMENT |
| LOW | …+/minimum-one-bit-operations-to-make-integers-zero.cpp | 1 | // Time: O(logn) | COMMENT |
| LOW | …+/minimum-one-bit-operations-to-make-integers-zero.cpp | 41 | // f(100) = 2 * f(10) + 1 = 7 | COMMENT |
| LOW | C++/intersection-of-two-arrays-ii.cpp | 1 | // If the given array is not sorted and the memory is unlimited: | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 1 | // Time: O(1) | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 21 | // 1 1 1 | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 41 | // 1 1 1 1 1 1 | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 61 | // extend: | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 81 | // 1 1 1 2 2 2 | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 101 | // 1 1 4 4 | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 121 | // 1 1 1 4 4 | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 141 | // 1 1 2 2 2 2 2 | COMMENT |
| LOW | C++/the-number-of-ways-to-make-the-sum.cpp | 161 | // 1 1 1 1 1 1 1 6 | COMMENT |
| LOW | C++/maximum-students-taking-exam.cpp | 1 | // Time: O(m * n * sqrt(m * n)) | COMMENT |
| LOW | C++/implement-trie-prefix-tree.cpp | 61 | }; | COMMENT |
| LOW | …/minimum-garden-perimeter-to-collect-enough-apples.cpp | 1 | // Time: O(1) | COMMENT |
| LOW | …/minimum-garden-perimeter-to-collect-enough-apples.cpp | 41 | // . . . | COMMENT |
| LOW | …/minimum-garden-perimeter-to-collect-enough-apples.cpp | 81 | // . . . | COMMENT |
| LOW | C++/sum-game.cpp | 1 | // Time: O(n) | COMMENT |
| LOW | C++/range-sum-query-immutable.cpp | 21 | COMMENT | |
| LOW | C++/super-egg-drop.cpp | 21 | // let f(n, K) be the max number of floors could be solved by n moves and K eggs, | COMMENT |
| LOW | C++/maximum-of-absolute-value-expression.cpp | 1 | // Time: O(n) | COMMENT |
| LOW | C++/find-array-given-subset-sums.cpp | 1 | // Time: O(n * 2^n), len(sums) = 2^n | COMMENT |
| LOW | C++/encode-and-decode-tinyurl.cpp | 41 | // Solution solution; | COMMENT |
| LOW | C++/subsequences-with-a-unique-middle-mode-i.cpp | 41 | result += nC2(l) * nC2(r); | COMMENT |
| LOW | C++/painting-a-grid-with-three-different-colors.cpp | 141 | const auto& adj = find_adj(m, basis, dp); // alternative of backtracking, Time: O(3^m), Space: O(3^m) | COMMENT |
| LOW | C++/number-of-burgers-with-no-waste-of-ingredients.cpp | 1 | // Time: O(1) | COMMENT |
| LOW | C++/maximum-number-of-accepted-invitations.cpp | 1 | // Time: O(m * n * sqrt(m + n)) | COMMENT |
| LOW | C++/stone-game-ix.cpp | 21 | // iff abs(count[1]-count[2]) >= 3, then alice takes the most one at first, the remains are deterministic for bo | COMMENT |
| LOW | C++/stream-of-characters2.cpp | 1 | // Time: ctor: O(n + p^2), n is the total size of patterns | COMMENT |
| LOW | C++/integer-break.cpp | 1 | // Time: O(logn), pow is O(logn). | COMMENT |
| LOW | C++/integer-break.cpp | 21 | // | COMMENT |
| LOW | Python/cat-and-mouse-ii.py | 181 | # if not degree[ni, nj, nt]: | COMMENT |
| LOW | Python/sum-of-all-odd-length-subarrays.py | 21 | # as the graph depicted above, | COMMENT |
| LOW | Python/maximum-number-of-ones.py | 21 | # 4. fill one into matrix by tile part of which count is in descending order | COMMENT |
| LOW | Python/airplane-seat-assignment-probability.py | 1 | # Time: O(1) | COMMENT |
| LOW | Python/maximum-of-absolute-value-expression.py | 1 | # Time: O(n) | COMMENT |
| LOW | Python/stone-game-ix.py | 21 | # ^ | COMMENT |
| LOW | Python/rectangle-area.py | 1 | # Time: O(1) | COMMENT |
| LOW | Python/lowest-common-ancestor-of-a-binary-tree.py | 1 | # Time: O(n) | COMMENT |
| LOW | Python/clumsy-factorial.py | 1 | # Time: O(1) | COMMENT |
| LOW | Python/permutations.py | 41 | COMMENT | |
| LOW | …n/minimum-garden-perimeter-to-collect-enough-apples.py | 41 | class Solution2(object): | COMMENT |
| LOW | …n/minimum-garden-perimeter-to-collect-enough-apples.py | 81 | # Space: O(1) | COMMENT |
| LOW | Python/painting-a-grid-with-three-different-colors.py | 141 | if m > n: | COMMENT |
| LOW | Python/subsequences-with-a-unique-middle-mode-i.py | 41 | # bb/a/ac | COMMENT |
| LOW | Python/stream-of-characters2.py | 1 | # Time: ctor: O(n + p^2), n is the total size of patterns | COMMENT |
| LOW | Python/stream-of-characters2.py | 81 | # obj = StreamChecker(words) | COMMENT |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Python/online-majority-element-in-subarray.py | 72 | def boyer_moore_majority_vote(nums, left, right): | CODE |
| LOW | Python/online-majority-element-in-subarray.py | 235 | def __boyer_moore_majority_vote(self, nums, left, right): | CODE |
| LOW | Python/maximum-prime-difference.py | 5 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/number-of-ways-to-buy-pens-and-pencils.py | 23 | def arithmetic_progression_sum(a, d, l): | CODE |
| LOW | Python/design-excel-sum-formula.py | 63 | def __calc_and_update_dependency(self, r, c, strs): | CODE |
| LOW | Python/index-pairs-of-a-string.py | 38 | def __create_ac_suffix_and_output_links(self, root): # Time: O(n), Space: O(t) | CODE |
| LOW | Python/divisible-and-non-divisible-sums-difference.py | 12 | def arithmetic_progression_sum(a, d, l): | CODE |
| LOW | Python/most-frequent-prime.py | 9 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/apply-operations-to-maximize-score.py | 16 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/apply-operations-to-maximize-score.py | 31 | def count_of_distinct_prime_factors(x): | CODE |
| LOW | Python/count-prime-gap-balanced-subarrays.py | 9 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/maximize-fixed-points-after-deletions.py | 14 | def longest_increasing_subsequence(arr): | CODE |
| LOW | Python/count-the-number-of-square-free-subsets.py | 14 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/count-the-number-of-square-free-subsets.py | 66 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | …n/minimum-number-of-valid-strings-to-form-target-ii.py | 71 | def __create_ac_suffix_and_output_links(self, root): # Time: O(n), Space: O(t) | CODE |
| LOW | Python/html-entity-parser.py | 40 | def __create_ac_suffix_and_output_links(self, root): # Time: O(n), Space: O(t) | CODE |
| LOW | Python/minimum-index-of-a-valid-split.py | 11 | def boyer_moore_majority_vote(): | CODE |
| LOW | …um-division-operations-to-make-array-non-decreasing.py | 6 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | Python/sum-of-primes-between-number-and-its-reverse.py | 6 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | …on/minimum-number-of-valid-strings-to-form-target-i.py | 71 | def __create_ac_suffix_and_output_links(self, root): # Time: O(n), Space: O(t) | CODE |
| LOW | Python/maximize-count-of-distinct-primes-after-split.py | 8 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/number-of-ways-to-separate-numbers.py | 11 | def find_longest_common_prefix(num): | CODE |
| LOW | Python/number-of-ways-to-separate-numbers.py | 19 | def is_less_or_equal_to_with_same_length(num, lcp, i, j, l): | CODE |
| LOW | …n/minimum-operations-to-make-the-array-k-increasing.py | 14 | def longest_non_decreasing_subsequence(arr): | CODE |
| LOW | …hon/find-the-count-of-numbers-which-are-not-special.py | 9 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/majority-element.py | 13 | def boyer_moore_majority_vote(): | CODE |
| LOW | Python/count-valid-paths-in-a-tree.py | 12 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/count-valid-paths-in-a-tree.py | 77 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/count-valid-paths-in-a-tree.py | 159 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/minimum-runes-to-add-to-cast-spell.py | 6 | def strongly_connected_components(adj): # Time: O(|V| + |E|) = O(N + 2N) = O(N), Space: O(|V|) = O(N) | CODE |
| LOW | …hon/count-ways-to-choose-coprime-integers-from-rows.py | 15 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/distinct-prime-factors-of-product-of-array.py | 6 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | Python/gcd-sort-of-an-array.py | 41 | def modified_sieve_of_eratosthenes(n, lookup, uf): # Time: O(n * log(logn)), Space: O(n) | CODE |
| LOW | Python/count-primes.py | 35 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | Python/minimum-swaps-to-avoid-forbidden-values.py | 12 | def boyer_moore_majority_vote(arr): | CODE |
| LOW | Python/stream-of-characters2.py | 45 | def __create_ac_suffix_and_output_links(self, root): # Time: O(n + p^2), Space: O(t + p^2) | CODE |
| LOW | Python/minimum-number-of-days-to-disconnect-island.py | 6 | def iter_get_articulation_points(graph, v): # modified | CODE |
| LOW | Python/length-of-the-longest-increasing-path.py | 15 | def longest_increasing_subsequence(arr): | CODE |
| LOW | Python/prime-in-diagonal.py | 6 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | Python/preimage-size-of-factorial-zeroes-function.py | 10 | def count_of_factorial_primes(n, p): | CODE |
| LOW | Python/digit-operations-to-make-two-integers-equal.py | 15 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/prime-subtraction-operation.py | 8 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | Python/maximum-subarray-with-equal-products.py | 9 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/stream-of-characters.py | 45 | def __create_ac_suffix_and_output_links(self, root): # Time: O(n), Space: O(t) | CODE |
| LOW | …perations-to-transform-array-into-alternating-prime.py | 6 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/greatest-common-divisor-traversal.py | 6 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | …an-original-string-exists-given-two-encoded-strings.py | 27 | def optimized_possible_numbers(s): | CODE |
| LOW | …/find-the-minimum-possible-sum-of-a-beautiful-array.py | 8 | def arithmetic_progression_sum(a, d, n): | CODE |
| LOW | Python/check-if-any-element-has-prime-frequency.py | 9 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | …imum-number-of-increasing-subsequence-to-be-removed.py | 14 | def longest_non_increasing_subsequence(arr): | CODE |
| LOW | …oduct-of-the-length-of-two-palindromic-subsequences.py | 10 | def palindromic_subsequence_length(s, mask): | CODE |
| LOW | Python/prime-pairs-with-target-sum.py | 11 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | Python/sum-of-perfect-square-ancestors.py | 8 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/count-the-number-of-ideal-arrays.py | 24 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/split-array-by-prime-indices.py | 6 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/closest-prime-numbers-in-range.py | 37 | def linear_sieve_of_eratosthenes(n): | CODE |
| LOW | Python/maximize-cyclic-partition-score.py | 12 | def best_time_to_buy_and_sell_stock_v(base): | CODE |
| LOW | …/minimum-jumps-to-reach-end-via-prime-teleportation.py | 9 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/divisible-game.py | 9 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| LOW | Python/count-ways-to-make-array-with-product.py | 22 | def linear_sieve_of_eratosthenes(n): # Time: O(n), Space: O(n) | CODE |
| 6 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Python/smallest-rectangle-enclosing-black-pixels.py | 4 | CODE | |
| LOW | Python/number-of-distinct-roll-sequences.py | 4 | CODE | |
| LOW | Python/minimum-cost-to-split-an-array.py | 4 | CODE | |
| LOW | Python/verbal-arithmetic-puzzle.py | 4 | CODE | |
| LOW | …al-array-state-after-k-multiplication-operations-ii.py | 4 | CODE | |
| LOW | …al-array-state-after-k-multiplication-operations-ii.py | 47 | CODE | |
| LOW | Python/match-substring-after-replacement.py | 4 | CODE | |
| LOW | Python/match-substring-after-replacement.py | 32 | CODE | |
| LOW | Python/course-schedule-iii.py | 4 | CODE | |
| LOW | Python/distinct-subsequences-ii.py | 4 | CODE | |
| LOW | Python/frequencies-of-shortest-supersequences.py | 4 | CODE | |
| LOW | Python/median-of-a-row-wise-sorted-matrix.py | 4 | CODE | |
| LOW | …nal-array-state-after-k-multiplication-operations-i.py | 4 | CODE | |
| LOW | …nal-array-state-after-k-multiplication-operations-i.py | 46 | CODE | |
| LOW | …number-of-nodes-in-the-sub-tree-with-the-same-label.py | 49 | CODE | |
| LOW | …on/design-an-expression-tree-with-evaluate-function.py | 4 | CODE | |
| LOW | Python/multiply-two-polynomials.py | 5 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …hon/number-of-ways-to-reorder-array-to-get-same-bst.py | 61 | CODE | |
| LOW | Python/maximum-difference-between-node-and-ancestor.py | 50 | CODE | |
| LOW | Python/minimum-cost-to-make-arrays-identical.py | 23 | CODE | |
| LOW | Python/maximum-total-value.py | 41 | CODE | |
| LOW | …thmetic-sequence-after-changing-at-most-one-element.py | 31 | CODE | |
| LOW | Python/count-the-number-of-infection-sequences.py | 31 | CODE | |
| LOW | Python/maximum-coins-from-k-consecutive-bags.py | 27 | CODE | |
| LOW | Python/number-of-1-bits.py | 64 | CODE | |
| LOW | Python/subsequence-with-the-minimum-score.py | 25 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Python/sum-of-all-odd-length-subarrays.py | 14 | # ---------------------------- | COMMENT |
| MEDIUM | Python/maximum-number-of-ones.py | 32 | # --------------------------- | COMMENT |
| MEDIUM | Python/maximum-number-of-ones.py | 38 | # --------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Python/convert-sorted-array-to-binary-search-tree.py | 55 | def helper(self, start, end): | CODE |
| LOW | …uct-binary-tree-from-preorder-and-inorder-traversal.py | 42 | def helper(start, end): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …r-that-sum-of-the-prices-is-less-than-or-equal-to-k.py | 131 | return binary_search_right(1, max(k<<2, 1<<x), lambda v: count(v) <= k) # right bound is verified by checking a | CODE |