Optimized recursive_bubble_sort (#2410)
* optimized recursive_bubble_sort
* Fixed doctest error due whitespace
* reduce loop times for optimization
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,7 @@ from number_theory.prime_numbers import check_prime, next_prime
|
||||
|
||||
class DoubleHash(HashTable):
|
||||
"""
|
||||
Hash Table example with open addressing and Double Hash
|
||||
Hash Table example with open addressing and Double Hash
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -4,7 +4,7 @@ from number_theory.prime_numbers import next_prime
|
||||
|
||||
class HashTable:
|
||||
"""
|
||||
Basic Hash Table example with open addressing and linear probing
|
||||
Basic Hash Table example with open addressing and linear probing
|
||||
"""
|
||||
|
||||
def __init__(self, size_table, charge_factor=None, lim_charge=None):
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
def check_prime(number):
|
||||
"""
|
||||
it's not the best solution
|
||||
"""
|
||||
it's not the best solution
|
||||
"""
|
||||
special_non_primes = [0, 1, 2]
|
||||
if number in special_non_primes[:2]:
|
||||
return 2
|
||||
|
||||
@@ -5,7 +5,7 @@ from hash_table import HashTable
|
||||
|
||||
class QuadraticProbing(HashTable):
|
||||
"""
|
||||
Basic Hash Table example with open addressing using Quadratic Probing
|
||||
Basic Hash Table example with open addressing using Quadratic Probing
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user