Skip to content

Rewrite Chinese Remainder Theorem implementation #1236

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

Closed
wants to merge 1 commit into from

Conversation

NabilMx99
Copy link

Changes:

  • Deleted the old implementation and wrote a new one from scratch.
  • Added detailed comments and documentation to explain the algorithm and code structure.
  • Improved input validation and user prompts.
  • Ensured the program checks for pairwise coprime moduli before computing the solution.

Testing:

  • Manually tested the program with several sets of congruence equations.
  • Verified correct results for known CRT examples.

Time Complexity : O(k × log²(n)), where k is the number of equations and n is the product of all moduli.

@NabilMx99 NabilMx99 changed the title Rewrite Chinese Remainder Theorem implementation and Add unit tests Rewrite Chinese Remainder Theorem implementation Jun 1, 2025
@NabilMx99 NabilMx99 closed this by deleting the head repository Jun 2, 2025
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.

1 participant