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

Add find primitive root #608

Merged
merged 11 commits into from
Dec 9, 2019
Merged

Conversation

D-Sinus
Copy link
Contributor

@D-Sinus D-Sinus commented Dec 5, 2019

(Put an X inside the [ ] to denote check mark [X].)

  • If creating a new file :

    • added links to it in the README files ?
    • included tests with it ?
    • added description (overview of algorithm, time and space complexity, and possible edge case) in docstrings ?
  • if done some changes :

    • wrote short description in the PR explaining what the changes do ?
    • Fixes #[issue number] if related to any issue
  • other

@D-Sinus
Copy link
Contributor Author

D-Sinus commented Dec 5, 2019

To find primitive root, Euler's totient function is used.
At first I think I need to implement that function by myself,
but 'goswami-rahul' already implemented that function.
So I copy his/her code and write comment about that (this is not my code)
Would it be allowed? If not, I'll delete that part and re-implement that function by myself.
Please let me know. Thanks.

0 is the only primitive root of 1 """
else:
phi = euler_totient(n)
pRootList = []
Copy link
Owner

Choose a reason for hiding this comment

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

please use consistent naming convention

Copy link
Contributor Author

@D-Sinus D-Sinus Dec 6, 2019

Choose a reason for hiding this comment

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

[Edit] Change pRootList into p_root_list

- [X] **If creating a new file :**
- [X] added links to it in the README files ?
- [X] included tests with it ?
- [X] added description (overview of algorithm, time and space complexity, and possible edge case) in docstrings ?
Copy link
Owner

Choose a reason for hiding this comment

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

no need to edit the template

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[Edit] Revert PULL_REQUEST_TEMPLATE.md

@keon keon merged commit 74566a3 into keon:master Dec 9, 2019
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