Data structure/sliding window examples #9454
Annotations
10 errors
Ruff (PLR1730):
data_structures/binary_tree/number_of_possible_binary_trees.py#L34
data_structures/binary_tree/number_of_possible_binary_trees.py:34:5: PLR1730 Replace `if` statement with `k = min(k, n - k)`
|
Ruff (INP001):
data_structures/sliding_window/longest_substring_two_distinct.py#L1
data_structures/sliding_window/longest_substring_two_distinct.py:1:1: INP001 File `data_structures/sliding_window/longest_substring_two_distinct.py` is part of an implicit namespace package. Add an `__init__.py`.
|
Ruff (INP001):
data_structures/sliding_window/max_sum_subarray.py#L1
data_structures/sliding_window/max_sum_subarray.py:1:1: INP001 File `data_structures/sliding_window/max_sum_subarray.py` is part of an implicit namespace package. Add an `__init__.py`.
|
Ruff (INP001):
data_structures/sliding_window/min_subarray_len.py#L1
data_structures/sliding_window/min_subarray_len.py:1:1: INP001 File `data_structures/sliding_window/min_subarray_len.py` is part of an implicit namespace package. Add an `__init__.py`.
|
Ruff (E501):
data_structures/sliding_window/min_subarray_len.py#L11
data_structures/sliding_window/min_subarray_len.py:11:89: E501 Line too long (126 > 88)
|
Ruff (PLR1730):
divide_and_conquer/closest_pair_of_points.py#L57
divide_and_conquer/closest_pair_of_points.py:57:13: PLR1730 Replace `if` statement with `min_dis = min(current_dis, min_dis)`
|
Ruff (PLR1730):
divide_and_conquer/closest_pair_of_points.py#L79
divide_and_conquer/closest_pair_of_points.py:79:13: PLR1730 Replace `if` statement with `min_dis = min(current_dis, min_dis)`
|
Ruff (PLR1730):
graphs/kahns_algorithm_long.py#L20
graphs/kahns_algorithm_long.py:20:13: PLR1730 Replace `if` statement with `max` call
|
Ruff (PLR1730):
maths/find_max.py#L23
maths/find_max.py:23:9: PLR1730 Replace `if` statement with `max_num = max(x, max_num)`
|
Ruff (PLR1730):
maths/special_numbers/bell_numbers.py#L64
maths/special_numbers/bell_numbers.py:64:5: PLR1730 Replace `if` statement with `min` call
|