Skip to content

Commit

Permalink
Karatsuba type annotation (TheAlgorithms#9800)
Browse files Browse the repository at this point in the history
* Replacing the generator with numpy vector operations from lu_decomposition.

* Revert "Replacing the generator with numpy vector operations from lu_decomposition."

This reverts commit ad217c6.

* Added type annotation.
  • Loading branch information
quant12345 authored Oct 5, 2023
1 parent 0e3ea3f commit 1b6c5cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maths/karatsuba.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" Multiply two numbers using Karatsuba algorithm """


def karatsuba(a, b):
def karatsuba(a: int, b: int) -> int:
"""
>>> karatsuba(15463, 23489) == 15463 * 23489
True
Expand Down

0 comments on commit 1b6c5cc

Please sign in to comment.