Skip to content

Added Strassen divide and conquer algorithm to multiply matrices. #1648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Putting docstring inside the function.
  • Loading branch information
AlexLeka98 committed Dec 28, 2019
commit 59bf2c6204535c26a220b91e03c191f9df169c63
9 changes: 5 additions & 4 deletions divide_and_conquer/power.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

"""
Function using divide and conquer to calculate a^b.
It only works for integer a,b.
"""

def power(a,b):
"""
Function using divide and conquer to calculate a^b.
It only works for integer a,b.
"""
if b == 0:
return 1
elif ( (b%2) == 0 ):
Expand Down