{"results":[{"id":"additive-then-subtractive-counting-pattern","text":"Grid geometry problems (surface area, island perimeter) use an \"add full contribution, then subtract shared faces\" strategy — computing isolated values first, then removing occlusion — as a reusable template.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"adjacent-pair-range-minus-one","text":"`range(len(nums) - 1)` with `nums[i+1]` access is the repo's standard pattern for pairwise element comparison, preventing out-of-bounds reads on the last index.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"adoption-barrier-gradient-explains-convergence-pattern","text":"The repo's multi-level convergence appears to correlate with strategy self-sufficiency: streaming, which requires no preprocessing or data structure selection, exhibits the strongest convergence, consistent with the principle that lower adoption barriers tend to produce stronger convergence pressure in an uncoordinated environment. Whether this gradient extends predictably to other paradigms (sort-then-scan, hash-then-scan) remains an observed pattern rather than a confirmed causal relationship.","truth_value":"IN","justification_count":1,"dependent_count":2,"challenges":[],"last_reviewed":"2026-06-07T22:02:22","review_result":"pass","source_type":""},{"id":"anchor-tracking-pattern-shared","text":"The \"last-seen non-zero\" anchor-tracking idiom appears in both `max_captured_forts` and `countHillValley` — skip irrelevant elements, compare the current significant value to the previous one.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"apply-ops-two-phase-pattern","text":"`apply-operations-to-an-array` uses a two-phase in-place transformation: Phase 1 (pairwise doubling, left-to-right with sequential dependency) must complete before Phase 2 (zero compaction via write-pointer), and interleaving them produces incorrect results.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"bfs-level-snapshot-pattern","text":"`averageOfLevels` partitions BFS into discrete levels by snapshotting `len(queue)` before each inner loop, not by using sentinels or multiple queues.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"binary-gap-bit-scan-pattern","text":"`binary_gap` uses `n & 1` / `n >>= 1` right-shift scanning rather than `bin()` string conversion — the same bit-scanning idiom appears in `number-of-1-bits/solution.py`.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"binary-search-on-derived-quantities-pattern","text":"Binary searching on a derived monotonic function (like missing-count) rather than on array values directly is a recurring technique in this repo, applicable to problems like kth-missing-positive and first-bad-version.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"binary-search-on-value-pattern","text":"`is_perfect_square` binary-searches the range `[1, num]` for a value whose square equals `num`, achieving O(log n) time and O(1) space with no library calls.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"binary-search-oracle-pattern","text":"`guessNumber` uses standard binary search but replaces array-index comparison with a ternary oracle function (`guess()`), making it a search over an implicit sorted sequence.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"broken-set-disjoint-pattern","text":"`canBeTypedWords` converts `brokenLetters` to a set and uses `set.isdisjoint` against each word, achieving O(n) time in total text length instead of O(n*b).","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"buy-sell-stock-single-pass-greedy","text":"`maxProfit` runs in O(n) time and O(1) space by tracking the running minimum price — a Kadane's-style greedy pattern.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"canformarray-first-element-keyed-lookup","text":"`canFormArray` indexes pieces by their first element into a dict, enabling O(1) lookup at each position in `arr` — a pattern that recurs in problems with distinctness constraints.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"canonical-form-frequency-counting-pattern","text":"Multiple solutions (domino pairs, good pairs, similar strings) reduce pair/group-counting problems to: canonicalize each element, count frequencies, then derive the answer from counts — avoiding O(n^2) pairwise comparison.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"clock-times-enumerate-over-case-logic","text":"`count_valid_times` iterates over all 24 hours and 60 minutes (84 total iterations) and pattern-matches, rather than building conditional case tables per digit position.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"closure-dfs-pattern","text":"Tree solutions use closure-based DFS where the inner `dfs` function captures a `result` list from the enclosing scope, avoiding return-value plumbing while keeping the recursion signature clean.","truth_value":"IN","justification_count":0,"dependent_count":1,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"closure-over-enclosing-scope-pattern","text":"Recursive helpers and inner functions capture variables (e.g., target values, the input string) from the enclosing method scope rather than accepting them as parameters.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"coherence-through-elimination-not-enforcement","text":"The repo exhibits architectural coherence primarily through elimination of prerequisites rather than enforcement of conventions: construction-based correctness removes the need for runtime validation, and submission-optimized isolation removes the need for cross-module coordination — together these patterns explain the characteristically lean function bodies, with this convergence emerging from LeetCode's problem structure rather than top-down design.","truth_value":"IN","justification_count":1,"dependent_count":2,"challenges":[],"last_reviewed":"2026-06-07T22:02:22","review_result":"pass","source_type":""},{"id":"collocated-tests-pattern","text":"Some solution files contain both the implementation and a `unittest.TestCase` subclass with a `__main__` guard, in addition to the separate `test_solution.py` files used by the repo's test harness","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""},{"id":"complement-count-one-pass","text":"For problems with exactly two valid target patterns (e.g., alternating binary strings), the repo counts mismatches against one pattern and derives the other as `len - count`, requiring only a single pass.","truth_value":"IN","justification_count":0,"dependent_count":0,"challenges":[],"last_reviewed":null,"review_result":null,"source_type":""}],"count":193,"limit":20,"offset":0}