Minimal examples of data structures and algorithms in Python
This report presents the forensic synthetic code analysis of keon/algorithms, a Python project with 25,508 GitHub stars. SynthScan v2.0 examined 36,165 lines of code across 438 source files, recording 1617 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 97.7 places this repository in the Strong 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).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
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 1617 distinct pattern matches across 14 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 | algorithms/tree/path_sum.py | 23 | Check if a root-to-leaf path with the given sum exists (recursive). Args: root: The root of the binary tree | STRING |
| HIGH | algorithms/tree/path_sum.py | 45 | Check if a root-to-leaf path with the given sum exists (DFS with stack). Args: root: The root of the binary | STRING |
| HIGH | algorithms/tree/path_sum.py | 73 | Check if a root-to-leaf path with the given sum exists (BFS with queue). Args: root: The root of the binary | STRING |
| HIGH | algorithms/tree/max_path_sum.py | 21 | Find the maximum path sum in a binary tree. Args: root: The root of the binary tree. Returns: | STRING |
| HIGH | algorithms/tree/same_tree.py | 20 | Check whether two binary trees are identical. Args: tree_p: The root of the first binary tree. tree | STRING |
| HIGH | algorithms/tree/is_balanced.py | 20 | Check whether a binary tree is height-balanced. Args: root: The root of the binary tree. Returns: | STRING |
| HIGH | algorithms/tree/binary_tree_paths.py | 20 | Return all root-to-leaf paths in the binary tree. Args: root: The root of the binary tree. Returns: | STRING |
| HIGH | algorithms/tree/pretty_print.py | 18 | Format a dictionary tree as a list of readable strings. Each top-level key maps to a list of sub-elements. The outp | STRING |
| HIGH | algorithms/tree/is_symmetric.py | 20 | Check whether a binary tree is symmetric using recursion. Args: root: The root of the binary tree. Ret | STRING |
| HIGH | algorithms/tree/is_symmetric.py | 55 | Check whether a binary tree is symmetric using iteration. Args: root: The root of the binary tree. Ret | STRING |
| HIGH | algorithms/tree/is_subtree.py | 22 | Check whether the small tree is a subtree of the big tree. Args: big: The root of the larger tree. | STRING |
| HIGH | algorithms/tree/max_height.py | 22 | Compute the maximum depth of a binary tree using iterative BFS. Args: root: The root of the binary tree. | STRING |
| HIGH | algorithms/tree/min_height.py | 37 | Compute the minimum depth of a binary tree using iterative BFS. Args: root: The root of the binary tree. | STRING |
| HIGH | algorithms/tree/bin_tree_to_list.py | 20 | Convert a binary tree to a sorted doubly linked list. Args: root: The root of the binary tree. Returns | STRING |
| HIGH | algorithms/tree/construct_tree_postorder_preorder.py | 25 | Recursively construct a binary tree from preorder and postorder arrays. Uses a global pre_index to track the curren | STRING |
| HIGH | algorithms/tree/construct_tree_postorder_preorder.py | 72 | Construct a full binary tree and return its inorder traversal. Args: pre: The preorder traversal array. | STRING |
| HIGH | algorithms/tree/lowest_common_ancestor.py | 21 | Find the lowest common ancestor of two nodes in a binary tree. Args: root: The root of the binary tree. | STRING |
| HIGH | algorithms/tree/path_sum2.py | 22 | Find all root-to-leaf paths with the given sum (recursive DFS). Args: root: The root of the binary tree. | STRING |
| HIGH | algorithms/tree/path_sum2.py | 61 | Find all root-to-leaf paths with the given sum (DFS with stack). Args: root: The root of the binary tree. | STRING |
| HIGH | algorithms/tree/path_sum2.py | 90 | Find all root-to-leaf paths with the given sum (BFS with queue). Args: root: The root of the binary tree. | STRING |
| HIGH | algorithms/tree/longest_consecutive.py | 20 | Find the length of the longest parent-to-child consecutive sequence. Args: root: The root of the binary tre | STRING |
| HIGH | algorithms/tree/binary_tree_views.py | 28 | Return the values visible from the left side of the tree. Args: root: Root of the binary tree. Returns | STRING |
| HIGH | algorithms/tree/binary_tree_views.py | 60 | Return the values visible from the right side of the tree. Args: root: Root of the binary tree. Return | STRING |
| HIGH | algorithms/tree/binary_tree_views.py | 92 | Return the values visible when looking at the tree from above. Nodes are ordered by horizontal distance from root ( | STRING |
| HIGH | algorithms/tree/binary_tree_views.py | 126 | Return the values visible when looking at the tree from below. Nodes are ordered by horizontal distance from root ( | STRING |
| HIGH | algorithms/data_structures/b_tree.py | 124 | Search for a key in the B-tree. Args: key: The key to search for. Returns: Tru | STRING |
| HIGH | algorithms/data_structures/veb_tree.py | 155 | Check whether element x exists in the tree. Args: x (int): Element to check. Retu | STRING |
| HIGH | algorithms/data_structures/veb_tree.py | 176 | Return the smallest element greater than x in the tree. Args: x (int): Element to find suc | STRING |
| HIGH | algorithms/data_structures/sqrt_decomposition.py | 61 | Set ``data[index]`` to *value* and update the block sum. Args: index: Array index to update. | STRING |
| HIGH | algorithms/data_structures/sqrt_decomposition.py | 85 | Return the sum of elements from *left* to *right* inclusive. Args: left: Start index (inclusive). | STRING |
| HIGH | …gorithms/bit_manipulation/flip_bit_longest_sequence.py | 18 | Find the longest 1-bit run achievable by flipping a single 0-bit. Tracks the current run length and the previous ru | STRING |
| HIGH | algorithms/bit_manipulation/count_ones.py | 18 | Count set bits using Brian Kernighan's algorithm (recursive). Args: number: A non-negative integer. Re | STRING |
| HIGH | algorithms/bit_manipulation/count_ones.py | 38 | Count set bits using Brian Kernighan's algorithm (iterative). Args: number: A non-negative integer. Re | STRING |
| HIGH | algorithms/bit_manipulation/binary_gap.py | 19 | Find the longest distance between consecutive 1-bits in binary. Args: number: A positive integer to examine | STRING |
| HIGH | algorithms/bit_manipulation/remove_bit.py | 18 | Remove the bit at a specific position from an integer. Splits the number around *position*, shifts the upper part r | STRING |
| HIGH | algorithms/bit_manipulation/reverse_bits.py | 17 | Reverse all 32 bits of an unsigned integer. Args: number: A 32-bit unsigned integer (0 to 2**32 - 1). | STRING |
| HIGH | algorithms/bit_manipulation/swap_pair.py | 18 | Swap every pair of adjacent bits in an integer. Masks odd-positioned bits (0xAAAAAAAA), shifts them right by one, | STRING |
| HIGH | algorithms/bit_manipulation/bit_operation.py | 18 | Get the bit value at a specific position. Shifts 1 over by *position* bits and ANDs with *number* to isolate th | STRING |
| HIGH | algorithms/bit_manipulation/bit_operation.py | 40 | Set the bit at a specific position to 1. Shifts 1 over by *position* bits and ORs with *number* so that only th | STRING |
| HIGH | algorithms/bit_manipulation/bit_operation.py | 60 | Clear the bit at a specific position to 0. Creates a mask with all bits set except at *position*, then ANDs wit | STRING |
| HIGH | algorithms/bit_manipulation/bit_operation.py | 81 | Update the bit at a specific position to a given value. First clears the bit at *position*, then ORs in the new *bi | STRING |
| HIGH | algorithms/bit_manipulation/single_number3.py | 19 | Find the two elements that each appear exactly once. Uses XOR to isolate the combined signature of the two unique v | STRING |
| HIGH | algorithms/bit_manipulation/single_number2.py | 19 | Find the element that appears once (all others appear three times). Uses two accumulators (*ones* and *twos*) to tr | STRING |
| HIGH | algorithms/bit_manipulation/insert_bit.py | 17 | Insert a single bit at a specific position in an integer. Splits the number at *position*, shifts the upper part le | STRING |
| HIGH | algorithms/bit_manipulation/insert_bit.py | 44 | Insert multiple bits at a specific position in an integer. Splits the number at *position*, shifts the upper part l | STRING |
| HIGH | algorithms/bit_manipulation/count_flips_to_convert.py | 19 | Count the number of bit flips needed to convert one integer to another. Args: first: The source integer. | STRING |
| HIGH | algorithms/bit_manipulation/power_of_two.py | 19 | Check whether an integer is a power of two. Args: number: The integer to test. Returns: True i | STRING |
| HIGH | algorithms/bit_manipulation/single_number.py | 18 | Find the element that appears only once (all others appear twice). XORs all values together; paired values cancel t | STRING |
| HIGH | algorithms/bit_manipulation/add_bitwise_operator.py | 18 | Add two non-negative integers using only bitwise operations. Args: first: First non-negative integer operan | STRING |
| HIGH | algorithms/bit_manipulation/subsets.py | 18 | Return all subsets of the given list as a set of tuples. Uses bitmask enumeration: for each number from 0 to 2^n - | STRING |
| HIGH | algorithms/bit_manipulation/bytes_int_conversion.py | 20 | Convert a non-negative integer to bytes in big-endian order. Args: number: A non-negative integer to conver | STRING |
| HIGH | algorithms/bit_manipulation/bytes_int_conversion.py | 40 | Convert a non-negative integer to bytes in little-endian order. Args: number: A non-negative integer to con | STRING |
| HIGH | algorithms/bit_manipulation/bytes_int_conversion.py | 60 | Convert a big-endian byte sequence to an integer. Args: byte_string: Bytes with the most significant byte f | STRING |
| HIGH | algorithms/bit_manipulation/bytes_int_conversion.py | 80 | Convert a little-endian byte sequence to an integer. Args: byte_string: Bytes with the least significant by | STRING |
| HIGH | algorithms/bit_manipulation/find_difference.py | 18 | Find the single character added to a shuffled copy of a string. Uses XOR on all character code points; paired chara | STRING |
| HIGH | algorithms/bit_manipulation/find_missing_number.py | 19 | Find the missing number using XOR. XORs every element with its expected index so that all paired values cancel | STRING |
| HIGH | algorithms/bit_manipulation/find_missing_number.py | 44 | Find the missing number using arithmetic summation. Computes the expected sum of 0..n and subtracts the actual sum | STRING |
| HIGH | algorithms/bit_manipulation/has_alternative_bit.py | 18 | Check for alternating bits by scanning each pair of adjacent bits. Args: number: A positive integer to chec | STRING |
| HIGH | algorithms/bit_manipulation/has_alternative_bit.py | 47 | Check for alternating bits using O(1) bitmask arithmetic. Args: number: A positive integer to check. R | STRING |
| HIGH | algorithms/array/longest_non_repeat.py | 18 | Find the length of the longest substring without repeating characters. Args: string: Input string to search | STRING |
| 392 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/__init__.py | 10 | CODE | |
| LOW | algorithms/__init__.py | 11 | CODE | |
| LOW | algorithms/__init__.py | 11 | CODE | |
| LOW | algorithms/__init__.py | 11 | CODE | |
| LOW | algorithms/tree/path_sum.py | 15 | CODE | |
| LOW | algorithms/tree/max_path_sum.py | 15 | CODE | |
| LOW | algorithms/tree/same_tree.py | 14 | CODE | |
| LOW | algorithms/tree/tree.py | 7 | CODE | |
| LOW | algorithms/tree/invert_tree.py | 13 | CODE | |
| LOW | algorithms/tree/is_balanced.py | 14 | CODE | |
| LOW | algorithms/tree/binary_tree_paths.py | 14 | CODE | |
| LOW | algorithms/tree/pretty_print.py | 14 | CODE | |
| LOW | algorithms/tree/is_symmetric.py | 14 | CODE | |
| LOW | algorithms/tree/is_subtree.py | 14 | CODE | |
| LOW | algorithms/tree/__init__.py | 8 | CODE | |
| LOW | algorithms/tree/__init__.py | 9 | CODE | |
| LOW | algorithms/tree/__init__.py | 10 | CODE | |
| LOW | algorithms/tree/__init__.py | 11 | CODE | |
| LOW | algorithms/tree/__init__.py | 12 | CODE | |
| LOW | algorithms/tree/__init__.py | 12 | CODE | |
| LOW | algorithms/tree/__init__.py | 12 | CODE | |
| LOW | algorithms/tree/__init__.py | 12 | CODE | |
| LOW | algorithms/tree/__init__.py | 18 | CODE | |
| LOW | algorithms/tree/__init__.py | 18 | CODE | |
| LOW | algorithms/tree/__init__.py | 22 | CODE | |
| LOW | algorithms/tree/__init__.py | 22 | CODE | |
| LOW | algorithms/tree/__init__.py | 23 | CODE | |
| LOW | algorithms/tree/__init__.py | 24 | CODE | |
| LOW | algorithms/tree/__init__.py | 25 | CODE | |
| LOW | algorithms/tree/__init__.py | 26 | CODE | |
| LOW | algorithms/tree/__init__.py | 26 | CODE | |
| LOW | algorithms/tree/__init__.py | 27 | CODE | |
| LOW | algorithms/tree/__init__.py | 28 | CODE | |
| LOW | algorithms/tree/__init__.py | 29 | CODE | |
| LOW | algorithms/tree/__init__.py | 30 | CODE | |
| LOW | algorithms/tree/__init__.py | 31 | CODE | |
| LOW | algorithms/tree/__init__.py | 31 | CODE | |
| LOW | algorithms/tree/__init__.py | 32 | CODE | |
| LOW | algorithms/tree/__init__.py | 32 | CODE | |
| LOW | algorithms/tree/__init__.py | 32 | CODE | |
| LOW | algorithms/tree/__init__.py | 33 | CODE | |
| LOW | algorithms/tree/__init__.py | 33 | CODE | |
| LOW | algorithms/tree/__init__.py | 33 | CODE | |
| LOW | algorithms/tree/__init__.py | 34 | CODE | |
| LOW | algorithms/tree/__init__.py | 35 | CODE | |
| LOW | algorithms/tree/__init__.py | 36 | CODE | |
| LOW | algorithms/tree/max_height.py | 14 | CODE | |
| LOW | algorithms/tree/min_height.py | 14 | CODE | |
| LOW | algorithms/tree/bin_tree_to_list.py | 14 | CODE | |
| LOW | algorithms/tree/construct_tree_postorder_preorder.py | 15 | CODE | |
| LOW | algorithms/tree/lowest_common_ancestor.py | 15 | CODE | |
| LOW | algorithms/tree/path_sum2.py | 14 | CODE | |
| LOW | algorithms/tree/longest_consecutive.py | 14 | CODE | |
| LOW | algorithms/tree/binary_tree_views.py | 20 | CODE | |
| LOW | algorithms/tree/deepest_left.py | 14 | CODE | |
| LOW | algorithms/data_structures/queue.py | 14 | CODE | |
| LOW | …rithms/data_structures/separate_chaining_hash_table.py | 14 | CODE | |
| LOW | algorithms/data_structures/heap.py | 15 | CODE | |
| LOW | algorithms/data_structures/hash_table.py | 15 | CODE | |
| LOW | algorithms/data_structures/b_tree.py | 15 | CODE | |
| 830 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/data_structures/b_tree.py | 281 | def _remove_from_nonleaf_node( | CODE |
| LOW | algorithms/data_structures/b_tree.py | 304 | def _find_largest_and_delete_in_left_subtree(self, node: Node) -> int: | CODE |
| LOW | algorithms/data_structures/b_tree.py | 323 | def _find_largest_and_delete_in_right_subtree(self, node: Node) -> int: | CODE |
| LOW | algorithms/bit_manipulation/bytes_int_conversion.py | 39 | def int_to_bytes_little_endian(number: int) -> bytes: | CODE |
| LOW | algorithms/bit_manipulation/bytes_int_conversion.py | 79 | def bytes_little_endian_to_int(byte_string: bytes) -> int: | CODE |
| LOW | algorithms/array/n_sum.py | 102 | def _append_elem_to_each_list( | CODE |
| LOW | algorithms/backtracking/array_sum_combinations.py | 78 | def unique_array_sum_combinations( | CODE |
| LOW | algorithms/backtracking/palindrome_partitioning.py | 43 | def palindromic_substrings_iter(text: str) -> Generator[list[str], None, None]: | CODE |
| LOW | algorithms/graph/bellman_ford.py | 58 | def _initialize_single_source( | CODE |
| LOW | …thms/dynamic_programming/longest_common_subsequence.py | 16 | def longest_common_subsequence(s_1: str, s_2: str) -> int: | CODE |
| LOW | algorithms/dynamic_programming/longest_increasing.py | 23 | def longest_increasing_subsequence(sequence: list[int]) -> int: | CODE |
| LOW | algorithms/dynamic_programming/longest_increasing.py | 45 | def longest_increasing_subsequence_optimized(sequence: list[int]) -> int: | CODE |
| LOW | algorithms/dynamic_programming/max_product_subarray.py | 45 | def subarray_with_max_product(arr: list[int]) -> tuple[int, list[int]]: | CODE |
| LOW | algorithms/dynamic_programming/combination_sum.py | 61 | def combination_sum_bottom_up(nums: list[int], target: int) -> int: | CODE |
| LOW | algorithms/math/diffie_hellman_key_exchange.py | 186 | def diffie_hellman_key_exchange(a: int, p: int, option: int | None = None) -> bool: | CODE |
| LOW | algorithms/math/distance_between_two_points.py | 19 | def distance_between_two_points(x1: float, y1: float, x2: float, y2: float) -> float: | CODE |
| LOW | algorithms/math/recursive_binomial_coefficient.py | 17 | def recursive_binomial_coefficient(n: int, k: int) -> int: | CODE |
| LOW | algorithms/math/symmetry_group_cycle_index.py | 49 | def cycle_product_for_two_polynomials( | CODE |
| LOW | algorithms/streaming/one_sparse_recovery.py | 51 | def _check_bit_sum_consistency(bitsum: list[int], sum_signs: int) -> bool: | CODE |
| LOW | algorithms/map/longest_palindromic_subsequence.py | 17 | def longest_palindromic_subsequence(s: str) -> int: | CODE |
| LOW | algorithms/compression/huffman_coding.py | 62 | def get_number_of_additional_bits_in_the_last_byte(self) -> int: | CODE |
| LOW | algorithms/compression/huffman_coding.py | 218 | def _save_information_about_additional_bits(self, additional_bits: int) -> None: | CODE |
| LOW | algorithms/compression/huffman_coding.py | 302 | def _decode_and_write_signs_to_file( | CODE |
| LOW | algorithms/compression/huffman_coding.py | 357 | def _encode_and_write_signs_to_file( | CODE |
| LOW | algorithms/compression/huffman_coding.py | 438 | def _go_through_tree_and_create_codes( | CODE |
| LOW | algorithms/greedy/max_contiguous_subsequence_sum.py | 17 | def max_contiguous_subsequence_sum(arr: list[int]) -> int: | CODE |
| LOW | algorithms/string/delete_reoccurring.py | 17 | def delete_reoccurring_characters(string: str) -> str: | CODE |
| LOW | algorithms/string/is_palindrome.py | 98 | def is_palindrome_two_pointer(text: str) -> bool: | CODE |
| LOW | algorithms/string/fizzbuzz.py | 53 | def fizzbuzz_with_helper_func(number: int) -> list[int | str]: | CODE |
| LOW | algorithms/string/longest_common_prefix.py | 98 | def _longest_common_recursive(strings: list[str], left: int, right: int) -> str: | CODE |
| LOW | algorithms/string/validate_coordinates.py | 68 | def is_valid_coordinates_regular_expression(coordinates: str) -> bool: | CODE |
| LOW | algorithms/matrix/search_in_sorted_matrix.py | 18 | def search_in_a_sorted_matrix( | CODE |
| LOW | algorithms/matrix/sparse_dot_vector.py | 17 | def vector_to_index_value_list( | CODE |
| LOW | algorithms/matrix/crout_matrix_decomposition.py | 19 | def crout_matrix_decomposition( | CODE |
| LOW | tests/test_iterative_segment_tree.py | 18 | def test_segment_tree_creation(self): | CODE |
| LOW | tests/test_iterative_segment_tree.py | 53 | def test_max_segment_tree_with_updates(self): | CODE |
| LOW | tests/test_iterative_segment_tree.py | 71 | def test_min_segment_tree_with_updates(self): | CODE |
| LOW | tests/test_iterative_segment_tree.py | 89 | def test_sum_segment_tree_with_updates(self): | CODE |
| LOW | tests/test_iterative_segment_tree.py | 107 | def test_gcd_segment_tree_with_updates(self): | CODE |
| LOW | tests/test_iterative_segment_tree.py | 135 | def __test_all_segments_with_updates(self, arr, fnc, upd): | CODE |
| LOW | tests/test_data_structures.py | 29 | def test_insert_multiple_sorted(self): | CODE |
| LOW | tests/test_data_structures.py | 45 | def test_insert_duplicates_order(self): | CODE |
| LOW | tests/test_data_structures.py | 59 | def test_insert_multiple_root_exists(self): | CODE |
| LOW | tests/test_data_structures.py | 65 | def test_balanced_after_insert(self): | CODE |
| LOW | tests/test_data_structures.py | 77 | def test_in_order_traverse_populated(self): | CODE |
| LOW | tests/test_data_structures.py | 83 | def test_insert_balance_factor(self): | CODE |
| LOW | tests/test_data_structures.py | 147 | def test_count_decrements_on_unite(self): | CODE |
| LOW | tests/test_data_structures.py | 162 | def test_transitive_connectivity(self): | CODE |
| LOW | tests/test_data_structures.py | 180 | def test_single_element_query(self): | CODE |
| LOW | tests/test_data_structures.py | 233 | def test_resizes_automatically(self): | CODE |
| LOW⚡ | tests/test_tree.py | 63 | def test_insertion_and_find_even_degree(self): | CODE |
| LOW⚡ | tests/test_tree.py | 72 | def test_insertion_and_find_odd_degree(self): | CODE |
| LOW⚡ | tests/test_tree.py | 81 | def test_deletion_even_degree(self): | CODE |
| LOW | tests/test_backtracking.py | 75 | def test_array_sum_combinations(self): | CODE |
| LOW | tests/test_backtracking.py | 97 | def test_unique_array_sum_combinations(self): | CODE |
| LOW | tests/test_backtracking.py | 140 | def test_recursive_get_factors(self): | CODE |
| LOW | tests/test_backtracking.py | 194 | def test_generate_abbreviations(self): | CODE |
| LOW | tests/test_backtracking.py | 269 | def test_generate_parenthesis(self): | CODE |
| LOW | tests/test_backtracking.py | 294 | def test_palindromic_substrings(self): | CODE |
| LOW | tests/test_stack.py | 72 | def test_is_valid_parenthesis(self): | CODE |
| 80 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | algorithms/tree/bst_delete_node.py | 14 | root = [5,3,6,2,4,null,7] | STRING |
| HIGH | algorithms/tree/bst_delete_node.py | 25 | One valid answer is [5,4,6,2,null,null,7], shown in the following BST. | STRING |
| HIGH | algorithms/tree/bst_delete_node.py | 33 | Another valid answer is [5,2,6,null,4,null,7]. | STRING |
| HIGH | algorithms/tree/traversal_zigzag.py | 8 | Given binary tree [3,9,20,null,null,15,7], | STRING |
| HIGH | algorithms/tree/traversal_level_order.py | 6 | Given binary tree [3,9,20,null,null,15,7], | STRING |
| HIGH | algorithms/data_structures/red_black_tree.py | 86 | # case 1 the parent is null, then set the inserted node as root and color = 0 | COMMENT |
| HIGH | algorithms/data_structures/red_black_tree.py | 106 | # case 3.2 the uncle node is black or null, | COMMENT |
| HIGH | algorithms/data_structures/red_black_tree.py | 129 | # case 3.2 the uncle node is black or null, | COMMENT |
| HIGH | algorithms/data_structures/stack.py | 63 | >>> s.push(1) | STRING |
| HIGH | algorithms/data_structures/stack.py | 142 | >>> s.push(1) | STRING |
| HIGH | algorithms/data_structures/priority_queue.py | 70 | self.push(item, priority=priority) | CODE |
| HIGH | algorithms/linked_list/copy_random_pointer.py | 5 | could point to any node in the list or null, return a deep copy of the list. | STRING |
| HIGH⚡ | algorithms/stack/ordered_stack.py | 23 | >>> s.push(3) | STRING |
| HIGH⚡ | algorithms/stack/ordered_stack.py | 24 | >>> s.push(1) | STRING |
| HIGH⚡ | algorithms/stack/ordered_stack.py | 25 | >>> s.push(2) | STRING |
| HIGH⚡ | tests/test_stack.py | 88 | stack.push(1) | CODE |
| HIGH⚡ | tests/test_stack.py | 89 | stack.push(2) | CODE |
| HIGH⚡ | tests/test_stack.py | 90 | stack.push(3) | CODE |
| HIGH⚡ | tests/test_stack.py | 121 | stack.push(1) | CODE |
| HIGH⚡ | tests/test_stack.py | 122 | stack.push(2) | CODE |
| HIGH⚡ | tests/test_stack.py | 123 | stack.push(3) | CODE |
| HIGH⚡ | tests/test_stack.py | 156 | stack.push(1) | CODE |
| HIGH⚡ | tests/test_stack.py | 157 | stack.push(4) | CODE |
| HIGH⚡ | tests/test_stack.py | 158 | stack.push(3) | CODE |
| HIGH⚡ | tests/test_stack.py | 159 | stack.push(6) | CODE |
| HIGH | tests/test_queue.py | 105 | queue.push(2) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | algorithms/tree/bst_count_left_node.py | 0 | the tree is created for testing: 9 / \ 6 12 / \\ / \ 3 8 10 15 / \ 7 18 num_empty = 10 | STRING |
| HIGH | algorithms/tree/bst_height.py | 0 | the tree is created for testing: 9 / \ 6 12 / \\ / \ 3 8 10 15 / \ 7 18 num_empty = 10 | STRING |
| HIGH | algorithms/tree/bst_num_empty.py | 0 | the tree is created for testing: 9 / \ 6 12 / \\ / \ 3 8 10 15 / \ 7 18 num_empty = 10 | STRING |
| HIGH | algorithms/sorting/shell_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/quick_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/merge_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/cycle_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/pigeonhole_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/pancake_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/insertion_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/gnome_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/bubble_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/stooge_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/selection_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/bogo_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/counting_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/heap_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/exchange_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| HIGH | algorithms/sorting/comb_sort.py | 0 | sort an array in ascending order using comb sort. args: array: list of integers to sort. returns: a sorted list. example | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/data_structures/red_black_tree.py | 85 | CODE | |
| LOW | algorithms/data_structures/red_black_tree.py | 208 | CODE | |
| LOW | algorithms/array/n_sum.py | 21 | CODE | |
| LOW | algorithms/array/n_sum.py | 80 | CODE | |
| LOW | algorithms/array/three_sum.py | 17 | CODE | |
| LOW | algorithms/array/garage.py | 18 | CODE | |
| LOW | algorithms/backtracking/permute_unique.py | 17 | CODE | |
| LOW | algorithms/backtracking/pattern_match.py | 37 | CODE | |
| LOW | algorithms/graph/traversal.py | 18 | CODE | |
| LOW | algorithms/graph/traversal.py | 44 | CODE | |
| LOW | algorithms/graph/count_islands_bfs.py | 20 | CODE | |
| LOW | algorithms/graph/bellman_ford.py | 18 | CODE | |
| LOW | algorithms/graph/all_pairs_shortest_path.py | 19 | CODE | |
| LOW | algorithms/graph/word_ladder.py | 20 | CODE | |
| LOW | algorithms/graph/maximum_flow_dfs.py | 20 | CODE | |
| LOW | algorithms/graph/maximum_flow_bfs.py | 21 | CODE | |
| LOW | algorithms/graph/topological_sort_dfs.py | 59 | CODE | |
| LOW | algorithms/graph/check_bipartite.py | 18 | CODE | |
| LOW | algorithms/graph/blossom.py | 17 | CODE | |
| LOW | algorithms/graph/blossom.py | 35 | CODE | |
| LOW | algorithms/graph/maximum_flow.py | 85 | CODE | |
| LOW | …thms/dynamic_programming/longest_common_subsequence.py | 16 | CODE | |
| LOW | algorithms/dynamic_programming/regex_matching.py | 17 | CODE | |
| LOW | algorithms/dynamic_programming/matrix_chain_order.py | 19 | CODE | |
| LOW | algorithms/dynamic_programming/int_divide.py | 17 | CODE | |
| LOW | algorithms/dynamic_programming/k_factor.py | 18 | CODE | |
| LOW | algorithms/dynamic_programming/egg_drop.py | 19 | CODE | |
| LOW | algorithms/linked_list/is_palindrome.py | 85 | CODE | |
| LOW | algorithms/math/polynomial.py | 319 | CODE | |
| LOW | algorithms/math/polynomial.py | 388 | CODE | |
| LOW | algorithms/math/polynomial.py | 435 | CODE | |
| LOW | algorithms/math/polynomial.py | 484 | CODE | |
| LOW | algorithms/streaming/misra_gries.py | 18 | CODE | |
| LOW | algorithms/map/longest_palindromic_subsequence.py | 17 | CODE | |
| LOW | algorithms/compression/huffman_coding.py | 302 | CODE | |
| LOW | algorithms/sorting/cycle_sort.py | 18 | CODE | |
| LOW | algorithms/string/breaking_bad.py | 80 | CODE | |
| LOW | algorithms/string/strip_url_params.py | 21 | CODE | |
| LOW | algorithms/string/fizzbuzz.py | 17 | CODE | |
| LOW | algorithms/string/text_justification.py | 18 | CODE | |
| LOW | algorithms/string/atbash_cipher.py | 17 | CODE | |
| LOW | algorithms/string/decode_string.py | 18 | CODE | |
| LOW | algorithms/set/set_covering.py | 76 | CODE | |
| LOW | algorithms/matrix/sparse_mul.py | 18 | CODE | |
| LOW | algorithms/matrix/sum_sub_squares.py | 17 | CODE | |
| LOW | algorithms/matrix/matrix_inversion.py | 21 | CODE | |
| LOW | algorithms/matrix/sudoku_validator.py | 20 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/__init__.py | 13 | __all__ = ["TreeNode", "ListNode", "Graph", "data_structures"] | CODE |
| LOW | algorithms/tree/tree.py | 9 | __all__ = ["TreeNode"] | CODE |
| LOW | algorithms/tree/__init__.py | 38 | __all__ = [ | CODE |
| LOW | algorithms/data_structures/__init__.py | 45 | __all__ = [ | CODE |
| LOW | algorithms/bit_manipulation/__init__.py | 27 | __all__ = [ | CODE |
| LOW | algorithms/array/__init__.py | 27 | __all__ = [ | CODE |
| LOW | algorithms/searching/__init__.py | 24 | __all__ = [ | CODE |
| LOW | algorithms/backtracking/__init__.py | 24 | __all__ = [ | CODE |
| LOW | algorithms/graph/graph.py | 10 | __all__ = ["DirectedEdge", "DirectedGraph", "Node"] | CODE |
| LOW | algorithms/graph/__init__.py | 58 | __all__ = [ | CODE |
| LOW | algorithms/dynamic_programming/__init__.py | 39 | __all__ = [ | CODE |
| LOW | algorithms/linked_list/__init__.py | 49 | __all__ = [ | CODE |
| LOW | algorithms/math/__init__.py | 68 | __all__ = [ | CODE |
| LOW | algorithms/streaming/one_sparse_recovery.py | 64 | def _update_bit_sum(bitsum: list[int], val: int, sign: str) -> None: | CODE |
| LOW | algorithms/streaming/__init__.py | 4 | __all__ = [ | CODE |
| LOW | algorithms/common/__init__.py | 13 | __all__ = ["TreeNode", "ListNode", "Graph"] | CODE |
| LOW | algorithms/map/__init__.py | 18 | __all__ = [ | CODE |
| LOW | algorithms/heap/__init__.py | 12 | __all__ = [ | CODE |
| LOW | algorithms/compression/__init__.py | 5 | __all__ = [ | CODE |
| LOW | algorithms/greedy/__init__.py | 4 | __all__ = [ | CODE |
| LOW | algorithms/sorting/__init__.py | 28 | __all__ = [ | CODE |
| LOW | algorithms/queue/__init__.py | 18 | __all__ = [ | CODE |
| LOW | algorithms/string/__init__.py | 79 | __all__ = [ | CODE |
| LOW | algorithms/stack/__init__.py | 22 | __all__ = [ | CODE |
| LOW | algorithms/set/__init__.py | 5 | __all__ = [ | CODE |
| LOW | algorithms/matrix/__init__.py | 20 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | algorithms/tree/bst_validate_bst.py | 1 | # =============================================================================== | COMMENT |
| MEDIUM | algorithms/tree/bst_validate_bst.py | 13 | # =============================================================================== | COMMENT |
| MEDIUM | tests/test_issue_fixes.py | 18 | # ── Dijkstra with priority queue (#565) ──────────────────────────────── | COMMENT |
| MEDIUM | tests/test_issue_fixes.py | 68 | # ── Goldbach's conjecture (#908) ──────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_issue_fixes.py | 106 | # ── Binary tree views (#829) ──────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/test_issue_fixes.py | 176 | # ── Square root decomposition (#651) ──────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/test_polynomial.py | 195 | # Check if quotient from poly_long_division matches expected | COMMENT |
| LOW⚡ | tests/test_polynomial.py | 198 | # Check if remainder from poly_long_division matches expected | COMMENT |
| LOW⚡ | tests/test_polynomial.py | 201 | # Check if quotient from __truediv__ matches quotient from poly_long_division | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/tree/bst_kth_smallest.py | 33 | def helper(self, node, count): | CODE |
| LOW | algorithms/dynamic_programming/count_paths_dp.py | 25 | def helper(i: int, j: int) -> int: | CODE |
| LOW | tests/test_searching.py | 29 | def helper(array, query): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/graph/satisfiability.py | 177 | CODE | |
| LOW | algorithms/math/symmetry_group_cycle_index.py | 136 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/tree/bst_validate_bst.py | 70 | # Example usage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/tree/bst_closest_value.py | 1 | # Given a non-empty binary search tree and a target value, | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | algorithms/math/pythagoras.py | 47 | except Exception as err: | CODE |