mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
Karatsuba type annotation (#9800)
* Replacing the generator with numpy vector operations from lu_decomposition.
* Revert "Replacing the generator with numpy vector operations from lu_decomposition."
This reverts commit ad217c6616
.
* Added type annotation.
This commit is contained in:
parent
0e3ea3fbab
commit
1b6c5cc271
|
@ -1,7 +1,7 @@
|
||||||
""" Multiply two numbers using Karatsuba algorithm """
|
""" Multiply two numbers using Karatsuba algorithm """
|
||||||
|
|
||||||
|
|
||||||
def karatsuba(a, b):
|
def karatsuba(a: int, b: int) -> int:
|
||||||
"""
|
"""
|
||||||
>>> karatsuba(15463, 23489) == 15463 * 23489
|
>>> karatsuba(15463, 23489) == 15463 * 23489
|
||||||
True
|
True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user