AI Slop Code RIsk Monitor

keon/algorithms

Minimal examples of data structures and algorithms in Python

97.8 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for keon/algorithms, a Python project with 25,565 GitHub stars. SynthScan examined 36,536 lines of code across 440 source files, recording 1638 pattern matches distributed across 15 syntactic categories. The legacy adjusted pattern signal is 97.8 (High 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.

97.8
Adjusted Signal
97.8
Raw Pattern Score
100%
Time Factor
2026-09-25
Last Push
25.6K
Stars
Python
Language
36.5K
Lines of Code
440
Files
1.6K
Pattern Hits
2026-10-12
Scan Date
1.14
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 96.7/100 · CRITICAL

Can maintainers explain intent, assumptions, and trade-offs? 662 finding(s).

Hallucinated Dependency & Supply Chain Risk 72.0/100 · HIGH

Are imports declared and package/API names verified? 923 finding(s).

Agent Over-Engineering Ratio 34.9/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 205 finding(s).

PR Review Velocity Impact 99.7/100 · CRITICAL

Which changes need focused human review? 1638 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 501MEDIUM 6LOW 1131

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 1638 distinct pattern matches across 15 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.

Docstring Block Structure454 hits · 2270 pts
SeverityFileLineSnippetContext
HIGHalgorithms/tree/path_sum.py23Check if a root-to-leaf path with the given sum exists (recursive). Args: root: The root of the binary treeSTRING
HIGHalgorithms/tree/path_sum.py45Check if a root-to-leaf path with the given sum exists (DFS with stack). Args: root: The root of the binarySTRING
HIGHalgorithms/tree/path_sum.py73Check if a root-to-leaf path with the given sum exists (BFS with queue). Args: root: The root of the binarySTRING
HIGHalgorithms/tree/max_path_sum.py21Find the maximum path sum in a binary tree. Args: root: The root of the binary tree. Returns: STRING
HIGHalgorithms/tree/same_tree.py20Check whether two binary trees are identical. Args: tree_p: The root of the first binary tree. treeSTRING
HIGHalgorithms/tree/is_balanced.py20Check whether a binary tree is height-balanced. Args: root: The root of the binary tree. Returns: STRING
HIGHalgorithms/tree/binary_tree_paths.py20Return all root-to-leaf paths in the binary tree. Args: root: The root of the binary tree. Returns: STRING
HIGHalgorithms/tree/pretty_print.py18Format a dictionary tree as a list of readable strings. Each top-level key maps to a list of sub-elements. The outpSTRING
HIGHalgorithms/tree/is_symmetric.py20Check whether a binary tree is symmetric using recursion. Args: root: The root of the binary tree. RetSTRING
HIGHalgorithms/tree/is_symmetric.py55Check whether a binary tree is symmetric using iteration. Args: root: The root of the binary tree. RetSTRING
HIGHalgorithms/tree/is_subtree.py22Check whether the small tree is a subtree of the big tree. Args: big: The root of the larger tree. STRING
HIGHalgorithms/tree/max_height.py22Compute the maximum depth of a binary tree using iterative BFS. Args: root: The root of the binary tree. STRING
HIGHalgorithms/tree/min_height.py37Compute the minimum depth of a binary tree using iterative BFS. Args: root: The root of the binary tree. STRING
HIGHalgorithms/tree/bin_tree_to_list.py20Convert a binary tree to a sorted doubly linked list. Args: root: The root of the binary tree. ReturnsSTRING
HIGHalgorithms/tree/construct_tree_postorder_preorder.py25Recursively construct a binary tree from preorder and postorder arrays. Uses a global pre_index to track the currenSTRING
HIGHalgorithms/tree/construct_tree_postorder_preorder.py72Construct a full binary tree and return its inorder traversal. Args: pre: The preorder traversal array. STRING
HIGHalgorithms/tree/lowest_common_ancestor.py21Find the lowest common ancestor of two nodes in a binary tree. Args: root: The root of the binary tree. STRING
HIGHalgorithms/tree/path_sum2.py22Find all root-to-leaf paths with the given sum (recursive DFS). Args: root: The root of the binary tree. STRING
HIGHalgorithms/tree/path_sum2.py61Find all root-to-leaf paths with the given sum (DFS with stack). Args: root: The root of the binary tree. STRING
HIGHalgorithms/tree/path_sum2.py90Find all root-to-leaf paths with the given sum (BFS with queue). Args: root: The root of the binary tree. STRING
HIGHalgorithms/tree/longest_consecutive.py20Find the length of the longest parent-to-child consecutive sequence. Args: root: The root of the binary treSTRING
HIGHalgorithms/tree/binary_tree_views.py28Return the values visible from the left side of the tree. Args: root: Root of the binary tree. ReturnsSTRING
HIGHalgorithms/tree/binary_tree_views.py60Return the values visible from the right side of the tree. Args: root: Root of the binary tree. ReturnSTRING
HIGHalgorithms/tree/binary_tree_views.py92Return the values visible when looking at the tree from above. Nodes are ordered by horizontal distance from root (STRING
HIGHalgorithms/tree/binary_tree_views.py126Return the values visible when looking at the tree from below. Nodes are ordered by horizontal distance from root (STRING
HIGHalgorithms/data_structures/b_tree.py124Search for a key in the B-tree. Args: key: The key to search for. Returns: TruSTRING
HIGHalgorithms/data_structures/veb_tree.py155 Check whether element x exists in the tree. Args: x (int): Element to check. RetuSTRING
HIGHalgorithms/data_structures/veb_tree.py176 Return the smallest element greater than x in the tree. Args: x (int): Element to find sucSTRING
HIGHalgorithms/data_structures/sqrt_decomposition.py61Set ``data[index]`` to *value* and update the block sum. Args: index: Array index to update. STRING
HIGHalgorithms/data_structures/sqrt_decomposition.py85Return the sum of elements from *left* to *right* inclusive. Args: left: Start index (inclusive). STRING
HIGH…gorithms/bit_manipulation/flip_bit_longest_sequence.py18Find the longest 1-bit run achievable by flipping a single 0-bit. Tracks the current run length and the previous ruSTRING
HIGHalgorithms/bit_manipulation/count_ones.py18Count set bits using Brian Kernighan's algorithm (recursive). Args: number: A non-negative integer. ReSTRING
HIGHalgorithms/bit_manipulation/count_ones.py38Count set bits using Brian Kernighan's algorithm (iterative). Args: number: A non-negative integer. ReSTRING
HIGHalgorithms/bit_manipulation/binary_gap.py19Find the longest distance between consecutive 1-bits in binary. Args: number: A positive integer to examineSTRING
HIGHalgorithms/bit_manipulation/remove_bit.py18Remove the bit at a specific position from an integer. Splits the number around *position*, shifts the upper part rSTRING
HIGHalgorithms/bit_manipulation/reverse_bits.py17Reverse all 32 bits of an unsigned integer. Args: number: A 32-bit unsigned integer (0 to 2**32 - 1). STRING
HIGHalgorithms/bit_manipulation/swap_pair.py18Swap every pair of adjacent bits in an integer. Masks odd-positioned bits (0xAAAAAAAA), shifts them right by one, STRING
HIGHalgorithms/bit_manipulation/bit_operation.py18Get the bit value at a specific position. Shifts 1 over by *position* bits and ANDs with *number* to isolate thSTRING
HIGHalgorithms/bit_manipulation/bit_operation.py40Set the bit at a specific position to 1. Shifts 1 over by *position* bits and ORs with *number* so that only thSTRING
HIGHalgorithms/bit_manipulation/bit_operation.py60Clear the bit at a specific position to 0. Creates a mask with all bits set except at *position*, then ANDs witSTRING
HIGHalgorithms/bit_manipulation/bit_operation.py81Update the bit at a specific position to a given value. First clears the bit at *position*, then ORs in the new *biSTRING
HIGHalgorithms/bit_manipulation/single_number3.py19Find the two elements that each appear exactly once. Uses XOR to isolate the combined signature of the two unique vSTRING
HIGHalgorithms/bit_manipulation/single_number2.py19Find the element that appears once (all others appear three times). Uses two accumulators (*ones* and *twos*) to trSTRING
HIGHalgorithms/bit_manipulation/insert_bit.py17Insert a single bit at a specific position in an integer. Splits the number at *position*, shifts the upper part leSTRING
HIGHalgorithms/bit_manipulation/insert_bit.py44Insert multiple bits at a specific position in an integer. Splits the number at *position*, shifts the upper part lSTRING
HIGHalgorithms/bit_manipulation/count_flips_to_convert.py19Count the number of bit flips needed to convert one integer to another. Args: first: The source integer. STRING
HIGHalgorithms/bit_manipulation/power_of_two.py19Check whether an integer is a power of two. Args: number: The integer to test. Returns: True iSTRING
HIGHalgorithms/bit_manipulation/single_number.py18Find the element that appears only once (all others appear twice). XORs all values together; paired values cancel tSTRING
HIGHalgorithms/bit_manipulation/add_bitwise_operator.py18Add two non-negative integers using only bitwise operations. Args: first: First non-negative integer operanSTRING
HIGHalgorithms/bit_manipulation/subsets.py18Return all subsets of the given list as a set of tuples. Uses bitmask enumeration: for each number from 0 to 2^n - STRING
HIGHalgorithms/bit_manipulation/bytes_int_conversion.py20Convert a non-negative integer to bytes in big-endian order. Args: number: A non-negative integer to converSTRING
HIGHalgorithms/bit_manipulation/bytes_int_conversion.py40Convert a non-negative integer to bytes in little-endian order. Args: number: A non-negative integer to conSTRING
HIGHalgorithms/bit_manipulation/bytes_int_conversion.py60Convert a big-endian byte sequence to an integer. Args: byte_string: Bytes with the most significant byte fSTRING
HIGHalgorithms/bit_manipulation/bytes_int_conversion.py80Convert a little-endian byte sequence to an integer. Args: byte_string: Bytes with the least significant bySTRING
HIGHalgorithms/bit_manipulation/find_difference.py18Find the single character added to a shuffled copy of a string. Uses XOR on all character code points; paired charaSTRING
HIGHalgorithms/bit_manipulation/find_missing_number.py19Find the missing number using XOR. XORs every element with its expected index so that all paired values cancel STRING
HIGHalgorithms/bit_manipulation/find_missing_number.py44Find the missing number using arithmetic summation. Computes the expected sum of 0..n and subtracts the actual sum STRING
HIGHalgorithms/bit_manipulation/has_alternative_bit.py18Check for alternating bits by scanning each pair of adjacent bits. Args: number: A positive integer to checSTRING
HIGHalgorithms/bit_manipulation/has_alternative_bit.py47Check for alternating bits using O(1) bitmask arithmetic. Args: number: A positive integer to check. RSTRING
HIGHalgorithms/array/longest_non_repeat.py18Find the length of the longest substring without repeating characters. Args: string: Input string to searchSTRING
394 more matches not shown…
Unused Imports896 hits · 783 pts
SeverityFileLineSnippetContext
LOWalgorithms/__init__.py10CODE
LOWalgorithms/__init__.py11CODE
LOWalgorithms/__init__.py11CODE
LOWalgorithms/__init__.py11CODE
LOWalgorithms/tree/path_sum.py15CODE
LOWalgorithms/tree/max_path_sum.py15CODE
LOWalgorithms/tree/same_tree.py14CODE
LOWalgorithms/tree/tree.py7CODE
LOWalgorithms/tree/invert_tree.py13CODE
LOWalgorithms/tree/is_balanced.py14CODE
LOWalgorithms/tree/binary_tree_paths.py14CODE
LOWalgorithms/tree/pretty_print.py14CODE
LOWalgorithms/tree/is_symmetric.py14CODE
LOWalgorithms/tree/is_subtree.py14CODE
LOWalgorithms/tree/__init__.py8CODE
LOWalgorithms/tree/__init__.py9CODE
LOWalgorithms/tree/__init__.py10CODE
LOWalgorithms/tree/__init__.py11CODE
LOWalgorithms/tree/__init__.py12CODE
LOWalgorithms/tree/__init__.py12CODE
LOWalgorithms/tree/__init__.py12CODE
LOWalgorithms/tree/__init__.py12CODE
LOWalgorithms/tree/__init__.py18CODE
LOWalgorithms/tree/__init__.py18CODE
LOWalgorithms/tree/__init__.py22CODE
LOWalgorithms/tree/__init__.py22CODE
LOWalgorithms/tree/__init__.py23CODE
LOWalgorithms/tree/__init__.py24CODE
LOWalgorithms/tree/__init__.py25CODE
LOWalgorithms/tree/__init__.py26CODE
LOWalgorithms/tree/__init__.py26CODE
LOWalgorithms/tree/__init__.py27CODE
LOWalgorithms/tree/__init__.py28CODE
LOWalgorithms/tree/__init__.py29CODE
LOWalgorithms/tree/__init__.py30CODE
LOWalgorithms/tree/__init__.py31CODE
LOWalgorithms/tree/__init__.py31CODE
LOWalgorithms/tree/__init__.py32CODE
LOWalgorithms/tree/__init__.py32CODE
LOWalgorithms/tree/__init__.py32CODE
LOWalgorithms/tree/__init__.py33CODE
LOWalgorithms/tree/__init__.py33CODE
LOWalgorithms/tree/__init__.py33CODE
LOWalgorithms/tree/__init__.py34CODE
LOWalgorithms/tree/__init__.py35CODE
LOWalgorithms/tree/__init__.py36CODE
LOWalgorithms/tree/__init__.py36CODE
LOWalgorithms/tree/__init__.py37CODE
LOWalgorithms/tree/max_height.py14CODE
LOWalgorithms/tree/min_height.py14CODE
LOWalgorithms/tree/bin_tree_to_list.py14CODE
LOWalgorithms/tree/construct_tree_postorder_preorder.py15CODE
LOWalgorithms/tree/lowest_common_ancestor.py15CODE
LOWalgorithms/tree/path_sum2.py14CODE
LOWalgorithms/tree/longest_consecutive.py14CODE
LOWalgorithms/tree/binary_tree_views.py20CODE
LOWalgorithms/tree/deepest_left.py14CODE
LOWalgorithms/data_structures/queue.py14CODE
LOW…rithms/data_structures/separate_chaining_hash_table.py14CODE
LOWalgorithms/data_structures/heap.py15CODE
836 more matches not shown…
Hyper-Verbose Identifiers150 hits · 166 pts
SeverityFileLineSnippetContext
LOWalgorithms/data_structures/b_tree.py281 def _remove_from_nonleaf_node(CODE
LOWalgorithms/data_structures/b_tree.py304 def _find_largest_and_delete_in_left_subtree(self, node: Node) -> int:CODE
LOWalgorithms/data_structures/b_tree.py323 def _find_largest_and_delete_in_right_subtree(self, node: Node) -> int:CODE
LOWalgorithms/bit_manipulation/bytes_int_conversion.py39def int_to_bytes_little_endian(number: int) -> bytes:CODE
LOWalgorithms/bit_manipulation/bytes_int_conversion.py79def bytes_little_endian_to_int(byte_string: bytes) -> int:CODE
LOWalgorithms/array/n_sum.py102 def _append_elem_to_each_list(CODE
LOWalgorithms/backtracking/array_sum_combinations.py78def unique_array_sum_combinations(CODE
LOWalgorithms/backtracking/palindrome_partitioning.py43def palindromic_substrings_iter(text: str) -> Generator[list[str], None, None]:CODE
LOWalgorithms/graph/bellman_ford.py58def _initialize_single_source(CODE
LOWalgorithms/graph/bellman_ford.py111def reconstruct_shortest_path(CODE
LOW…thms/dynamic_programming/longest_common_subsequence.py16def longest_common_subsequence(s_1: str, s_2: str) -> int:CODE
LOWalgorithms/dynamic_programming/longest_increasing.py23def longest_increasing_subsequence(sequence: list[int]) -> int:CODE
LOWalgorithms/dynamic_programming/longest_increasing.py45def longest_increasing_subsequence_optimized(sequence: list[int]) -> int:CODE
LOWalgorithms/dynamic_programming/max_product_subarray.py45def subarray_with_max_product(arr: list[int]) -> tuple[int, list[int]]:CODE
LOWalgorithms/dynamic_programming/combination_sum.py61def combination_sum_bottom_up(nums: list[int], target: int) -> int:CODE
LOWalgorithms/math/diffie_hellman_key_exchange.py191def diffie_hellman_key_exchange(a: int, p: int, option: int | None = None) -> bool:CODE
LOWalgorithms/math/distance_between_two_points.py19def distance_between_two_points(x1: float, y1: float, x2: float, y2: float) -> float:CODE
LOWalgorithms/math/recursive_binomial_coefficient.py17def recursive_binomial_coefficient(n: int, k: int) -> int:CODE
LOWalgorithms/math/symmetry_group_cycle_index.py49def cycle_product_for_two_polynomials(CODE
LOWalgorithms/streaming/one_sparse_recovery.py51def _check_bit_sum_consistency(bitsum: list[int], sum_signs: int) -> bool:CODE
LOWalgorithms/map/longest_palindromic_subsequence.py17def longest_palindromic_subsequence(s: str) -> int:CODE
LOWalgorithms/compression/lzw_compression.py19def _build_initial_dictionary(data: str) -> dict[str, int]:CODE
LOWalgorithms/compression/huffman_coding.py62 def get_number_of_additional_bits_in_the_last_byte(self) -> int:CODE
LOWalgorithms/compression/huffman_coding.py218 def _save_information_about_additional_bits(self, additional_bits: int) -> None:CODE
LOWalgorithms/compression/huffman_coding.py302 def _decode_and_write_signs_to_file(CODE
LOWalgorithms/compression/huffman_coding.py357 def _encode_and_write_signs_to_file(CODE
LOWalgorithms/compression/huffman_coding.py438 def _go_through_tree_and_create_codes(CODE
LOWalgorithms/greedy/max_contiguous_subsequence_sum.py17def max_contiguous_subsequence_sum(arr: list[int]) -> int:CODE
LOWalgorithms/string/delete_reoccurring.py17def delete_reoccurring_characters(string: str) -> str:CODE
LOWalgorithms/string/is_palindrome.py98def is_palindrome_two_pointer(text: str) -> bool:CODE
LOWalgorithms/string/fizzbuzz.py53def fizzbuzz_with_helper_func(number: int) -> list[int | str]:CODE
LOWalgorithms/string/longest_common_prefix.py98def _longest_common_recursive(strings: list[str], left: int, right: int) -> str:CODE
LOWalgorithms/string/validate_coordinates.py68def is_valid_coordinates_regular_expression(coordinates: str) -> bool:CODE
LOWalgorithms/matrix/search_in_sorted_matrix.py18def search_in_a_sorted_matrix(CODE
LOWalgorithms/matrix/sparse_dot_vector.py17def vector_to_index_value_list(CODE
LOWalgorithms/matrix/crout_matrix_decomposition.py19def crout_matrix_decomposition(CODE
LOWtests/test_iterative_segment_tree.py18 def test_segment_tree_creation(self):CODE
LOWtests/test_iterative_segment_tree.py53 def test_max_segment_tree_with_updates(self):CODE
LOWtests/test_iterative_segment_tree.py71 def test_min_segment_tree_with_updates(self):CODE
LOWtests/test_iterative_segment_tree.py89 def test_sum_segment_tree_with_updates(self):CODE
LOWtests/test_iterative_segment_tree.py107 def test_gcd_segment_tree_with_updates(self):CODE
LOWtests/test_iterative_segment_tree.py135 def __test_all_segments_with_updates(self, arr, fnc, upd):CODE
LOWtests/test_data_structures.py29 def test_insert_multiple_sorted(self):CODE
LOWtests/test_data_structures.py45 def test_insert_duplicates_order(self):CODE
LOWtests/test_data_structures.py59 def test_insert_multiple_root_exists(self):CODE
LOWtests/test_data_structures.py65 def test_balanced_after_insert(self):CODE
LOWtests/test_data_structures.py77 def test_in_order_traverse_populated(self):CODE
LOWtests/test_data_structures.py83 def test_insert_balance_factor(self):CODE
LOWtests/test_data_structures.py147 def test_count_decrements_on_unite(self):CODE
LOWtests/test_data_structures.py162 def test_transitive_connectivity(self):CODE
LOWtests/test_data_structures.py180 def test_single_element_query(self):CODE
LOWtests/test_data_structures.py233 def test_resizes_automatically(self):CODE
LOW⚡tests/test_tree.py63 def test_insertion_and_find_even_degree(self):CODE
LOW⚡tests/test_tree.py72 def test_insertion_and_find_odd_degree(self):CODE
LOW⚡tests/test_tree.py81 def test_deletion_even_degree(self):CODE
LOWtests/test_backtracking.py75 def test_array_sum_combinations(self):CODE
LOWtests/test_backtracking.py97 def test_unique_array_sum_combinations(self):CODE
LOWtests/test_backtracking.py140 def test_recursive_get_factors(self):CODE
LOWtests/test_backtracking.py194 def test_generate_abbreviations(self):CODE
LOWtests/test_backtracking.py269 def test_generate_parenthesis(self):CODE
90 more matches not shown…
Cross-Language Confusion27 hits · 146 pts
SeverityFileLineSnippetContext
HIGHalgorithms/tree/bst_delete_node.py14root = [5,3,6,2,4,null,7]STRING
HIGHalgorithms/tree/bst_delete_node.py25One valid answer is [5,4,6,2,null,null,7], shown in the following BST.STRING
HIGHalgorithms/tree/bst_delete_node.py33Another valid answer is [5,2,6,null,4,null,7].STRING
HIGHalgorithms/tree/traversal_zigzag.py8Given binary tree [3,9,20,null,null,15,7],STRING
HIGHalgorithms/tree/traversal_level_order.py6Given binary tree [3,9,20,null,null,15,7],STRING
HIGHalgorithms/data_structures/red_black_tree.py86 # case 1 the parent is null, then set the inserted node as root and color = 0COMMENT
HIGHalgorithms/data_structures/red_black_tree.py106 # case 3.2 the uncle node is black or null,COMMENT
HIGHalgorithms/data_structures/red_black_tree.py129 # case 3.2 the uncle node is black or null,COMMENT
HIGHalgorithms/data_structures/stack.py63 >>> s.push(1)STRING
HIGHalgorithms/data_structures/stack.py142 >>> s.push(1)STRING
HIGHalgorithms/data_structures/priority_queue.py70 self.push(item, priority=priority)CODE
HIGHalgorithms/linked_list/copy_random_pointer.py5could point to any node in the list or null, return a deep copy of the list.STRING
HIGH⚡algorithms/stack/ordered_stack.py23 >>> s.push(3)STRING
HIGH⚡algorithms/stack/ordered_stack.py24 >>> s.push(1)STRING
HIGH⚡algorithms/stack/ordered_stack.py25 >>> s.push(2)STRING
HIGH⚡tests/test_stack.py88 stack.push(1)CODE
HIGH⚡tests/test_stack.py89 stack.push(2)CODE
HIGH⚡tests/test_stack.py90 stack.push(3)CODE
HIGH⚡tests/test_stack.py121 stack.push(1)CODE
HIGH⚡tests/test_stack.py122 stack.push(2)CODE
HIGH⚡tests/test_stack.py123 stack.push(3)CODE
HIGH⚡tests/test_stack.py156 stack.push(1)CODE
HIGH⚡tests/test_stack.py157 stack.push(4)CODE
HIGH⚡tests/test_stack.py158 stack.push(3)CODE
HIGH⚡tests/test_stack.py159 stack.push(6)CODE
HIGH⚡tests/test_audit_regressions.py112 stack.push(value)CODE
HIGHtests/test_queue.py105 queue.push(2)CODE
Cross-File Repetition19 hits · 95 pts
SeverityFileLineSnippetContext
HIGHalgorithms/tree/bst_count_left_node.py0the tree is created for testing: 9 / \ 6 12 / \\ / \ 3 8 10 15 / \ 7 18 num_empty = 10STRING
HIGHalgorithms/tree/bst_height.py0the tree is created for testing: 9 / \ 6 12 / \\ / \ 3 8 10 15 / \ 7 18 num_empty = 10STRING
HIGHalgorithms/tree/bst_num_empty.py0the tree is created for testing: 9 / \ 6 12 / \\ / \ 3 8 10 15 / \ 7 18 num_empty = 10STRING
HIGHalgorithms/sorting/shell_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/quick_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/merge_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/cycle_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/pigeonhole_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/pancake_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/insertion_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/gnome_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/bubble_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/stooge_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/selection_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/bogo_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/counting_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/heap_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/exchange_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
HIGHalgorithms/sorting/comb_sort.py0sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. exampleSTRING
Deep Nesting48 hits · 48 pts
SeverityFileLineSnippetContext
LOWalgorithms/data_structures/red_black_tree.py85CODE
LOWalgorithms/data_structures/red_black_tree.py208CODE
LOWalgorithms/array/n_sum.py21CODE
LOWalgorithms/array/n_sum.py80CODE
LOWalgorithms/array/three_sum.py17CODE
LOWalgorithms/array/garage.py18CODE
LOWalgorithms/backtracking/permute_unique.py17CODE
LOWalgorithms/backtracking/pattern_match.py37CODE
LOWalgorithms/graph/traversal.py18CODE
LOWalgorithms/graph/traversal.py44CODE
LOWalgorithms/graph/count_islands_bfs.py20CODE
LOWalgorithms/graph/bellman_ford.py18CODE
LOWalgorithms/graph/bellman_ford.py82CODE
LOWalgorithms/graph/all_pairs_shortest_path.py19CODE
LOWalgorithms/graph/word_ladder.py20CODE
LOWalgorithms/graph/maximum_flow_dfs.py20CODE
LOWalgorithms/graph/maximum_flow_bfs.py21CODE
LOWalgorithms/graph/topological_sort_dfs.py59CODE
LOWalgorithms/graph/check_bipartite.py18CODE
LOWalgorithms/graph/blossom.py17CODE
LOWalgorithms/graph/blossom.py35CODE
LOWalgorithms/graph/maximum_flow.py85CODE
LOW…thms/dynamic_programming/longest_common_subsequence.py16CODE
LOWalgorithms/dynamic_programming/regex_matching.py17CODE
LOWalgorithms/dynamic_programming/matrix_chain_order.py19CODE
LOWalgorithms/dynamic_programming/int_divide.py17CODE
LOWalgorithms/dynamic_programming/k_factor.py18CODE
LOWalgorithms/dynamic_programming/egg_drop.py19CODE
LOWalgorithms/linked_list/is_palindrome.py85CODE
LOWalgorithms/math/polynomial.py319CODE
LOWalgorithms/math/polynomial.py388CODE
LOWalgorithms/math/polynomial.py435CODE
LOWalgorithms/math/polynomial.py484CODE
LOWalgorithms/streaming/misra_gries.py18CODE
LOWalgorithms/map/longest_palindromic_subsequence.py17CODE
LOWalgorithms/compression/huffman_coding.py302CODE
LOWalgorithms/sorting/cycle_sort.py18CODE
LOWalgorithms/string/breaking_bad.py80CODE
LOWalgorithms/string/strip_url_params.py21CODE
LOWalgorithms/string/fizzbuzz.py17CODE
LOWalgorithms/string/text_justification.py18CODE
LOWalgorithms/string/atbash_cipher.py17CODE
LOWalgorithms/string/decode_string.py18CODE
LOWalgorithms/set/set_covering.py76CODE
LOWalgorithms/matrix/sparse_mul.py18CODE
LOWalgorithms/matrix/sum_sub_squares.py17CODE
LOWalgorithms/matrix/matrix_inversion.py21CODE
LOWalgorithms/matrix/sudoku_validator.py20CODE
Modern Structural Boilerplate26 hits · 26 pts
SeverityFileLineSnippetContext
LOWalgorithms/__init__.py13__all__ = ["TreeNode", "ListNode", "Graph", "data_structures"]CODE
LOWalgorithms/tree/tree.py9__all__ = ["TreeNode"]CODE
LOWalgorithms/tree/__init__.py39__all__ = [CODE
LOWalgorithms/data_structures/__init__.py45__all__ = [CODE
LOWalgorithms/bit_manipulation/__init__.py27__all__ = [CODE
LOWalgorithms/array/__init__.py27__all__ = [CODE
LOWalgorithms/searching/__init__.py24__all__ = [CODE
LOWalgorithms/backtracking/__init__.py24__all__ = [CODE
LOWalgorithms/graph/graph.py10__all__ = ["DirectedEdge", "DirectedGraph", "Node"]CODE
LOWalgorithms/graph/__init__.py58__all__ = [CODE
LOWalgorithms/dynamic_programming/__init__.py39__all__ = [CODE
LOWalgorithms/linked_list/__init__.py49__all__ = [CODE
LOWalgorithms/math/__init__.py68__all__ = [CODE
LOWalgorithms/streaming/one_sparse_recovery.py64def _update_bit_sum(bitsum: list[int], val: int, sign: str) -> None:CODE
LOWalgorithms/streaming/__init__.py4__all__ = [CODE
LOWalgorithms/common/__init__.py13__all__ = ["TreeNode", "ListNode", "Graph"]CODE
LOWalgorithms/map/__init__.py18__all__ = [CODE
LOWalgorithms/heap/__init__.py12__all__ = [CODE
LOWalgorithms/compression/__init__.py6__all__ = [CODE
LOWalgorithms/greedy/__init__.py4__all__ = [CODE
LOWalgorithms/sorting/__init__.py28__all__ = [CODE
LOWalgorithms/queue/__init__.py18__all__ = [CODE
LOWalgorithms/string/__init__.py79__all__ = [CODE
LOWalgorithms/stack/__init__.py22__all__ = [CODE
LOWalgorithms/set/__init__.py5__all__ = [CODE
LOWalgorithms/matrix/__init__.py20__all__ = [CODE
Decorative Section Separators6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMalgorithms/tree/bst_validate_bst.py1# ===============================================================================COMMENT
MEDIUMalgorithms/tree/bst_validate_bst.py13# ===============================================================================COMMENT
MEDIUMtests/test_issue_fixes.py18# ── Dijkstra with priority queue (#565) ────────────────────────────────COMMENT
MEDIUMtests/test_issue_fixes.py68# ── Goldbach's conjecture (#908) ────────────────────────────────────────COMMENT
MEDIUMtests/test_issue_fixes.py106# ── Binary tree views (#829) ────────────────────────────────────────────COMMENT
MEDIUMtests/test_issue_fixes.py176# ── Square root decomposition (#651) ────────────────────────────────────COMMENT
Redundant / Tautological Comments3 hits · 7 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_polynomial.py195 # Check if quotient from poly_long_division matches expectedCOMMENT
LOW⚡tests/test_polynomial.py198 # Check if remainder from poly_long_division matches expectedCOMMENT
LOW⚡tests/test_polynomial.py201 # Check if quotient from __truediv__ matches quotient from poly_long_divisionCOMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHalgorithms/data_structures/graph.py128except ValueError:CODE
Overly Generic Function Names3 hits · 3 pts
SeverityFileLineSnippetContext
LOWalgorithms/tree/bst_kth_smallest.py33 def helper(self, node, count):CODE
LOWalgorithms/dynamic_programming/count_paths_dp.py25 def helper(i: int, j: int) -> int:CODE
LOWtests/test_searching.py29 def helper(array, query):CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWalgorithms/graph/satisfiability.py177CODE
LOWalgorithms/math/symmetry_group_cycle_index.py136CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWalgorithms/tree/bst_validate_bst.py70# Example usageCOMMENT
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWalgorithms/tree/bst_closest_value.py1# Given a non-empty binary search tree and a target value,COMMENT
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippetContext
LOWalgorithms/math/pythagoras.py47 except Exception as err:CODE