Skip to content
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

Fast Exponentiation Algorithms Added #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

all0fme
Copy link

@all0fme all0fme commented Oct 1, 2020

Includes binary exponentiation for numbers and Matrix exponentiation.

Includes binary exponentiation for numbers and Matrix exponentiation.
Copy link
Owner

@akzare akzare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment your code to the implemented code. A unit test would help us to guarantee the code functionality.

cin>>a>>n;
cout<<power(a,n);
return 0;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you possibly implement the unit test for this algorithm and put it in the corresponding C++ unit test folder?

@@ -0,0 +1,29 @@
#include<bits/stdc++.h>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a meaningful header and also some informative comments to different parts of the code to be more readable.

@@ -0,0 +1,80 @@
//for more info refer : https://www.spoj.com/problems/MPOW/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a meaningful header and also some informative comments to different parts of the code to be more readable.

}
return 0;

}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you possibly implement the unit test for this algorithm and put it in the corresponding C++ unit test folder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants