[pre-commit.ci] pre-commit autoupdate (#11322)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
pre-commit-ci[bot]
2024-03-13 07:52:41 +01:00
committed by GitHub
parent 5f95d6f805
commit bc8df6de31
297 changed files with 488 additions and 285 deletions

View File

@ -6,6 +6,7 @@ elements whose sum is equal to req_sum.
https://practice.geeksforgeeks.org/problems/count-pairs-with-given-sum5022/0
"""
from itertools import combinations

View File

@ -1,15 +1,16 @@
"""
Sparse table is a data structure that allows answering range queries on
a static number list, i.e. the elements do not change throughout all the queries.
Sparse table is a data structure that allows answering range queries on
a static number list, i.e. the elements do not change throughout all the queries.
The implementation below will solve the problem of Range Minimum Query:
Finding the minimum value of a subset [L..R] of a static number list.
The implementation below will solve the problem of Range Minimum Query:
Finding the minimum value of a subset [L..R] of a static number list.
Overall time complexity: O(nlogn)
Overall space complexity: O(nlogn)
Overall time complexity: O(nlogn)
Overall space complexity: O(nlogn)
Wikipedia link: https://en.wikipedia.org/wiki/Range_minimum_query
Wikipedia link: https://en.wikipedia.org/wiki/Range_minimum_query
"""
from math import log2

View File

@ -3,6 +3,7 @@ Please do not modify this file! It is published at https://norvig.com/sudoku.ht
only minimal changes to work with modern versions of Python. If you have improvements,
please make them in a separate file.
"""
import random
import time