Implement GCD Calculator Using Prime Factorization #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement GCD Calculator Using Prime Factorization
Description
Task
Implement GCD Calculator Using Prime Factors
Acceptance Criteria
Summary of Work
Overview
This pull request implements a Greatest Common Divisor (GCD) calculator using prime factorization technique, leveraging the existing prime factorization functionality.
Changes Made
src/gcd_calculator.pywithgcd_using_prime_factors()functiontests/test_gcd_calculator.pyImplementation Details
prime_factorization()to break down numbers into their prime factorscollections.Counterto efficiently count prime factor occurrencesTesting Approach
Acceptance Criteria
✅ Correctly calculates GCD using prime factorization
✅ Handles edge cases and error scenarios
✅ Well-documented and tested implementation
✅ Uses existing prime factorization functionality
Notes
src/prime_factorization.pyfor prime factor generationChanges Made
Tests
Signatures
Staking Key
7aAADu3aXXncSyvSVErKbQqGF3caWZkVz9MSLorvgv2f: 9M5j26NNS5nLa1CweXKYiDXUMpVwKUMy8Qved23PWikGxYYzitZcYSjkYDc1orxJFT633szyvD9trBYM3XSNmKrE7DLVfJ8c9U8QFhC5cCcg9LB5VZNAcHSR1izmBp5Go12BNQ4idVQBMoaRM8kc7oCM8MbyyuZShwnR3hajiUBskufgYZHZD1KU7yxHeTutM9xo6TKGSuyc8X8hrnbR7NVCnM6YkXpvRUqTkLJWFBb5bWRvUk1aX8GaBzgwKDkJQuoYn8UHocTBBge1pkbUHKUYNKExbNKVzJX7oaPd3QoMimVXDPuGXZ1pEHrNhfkz1wsDGtAyjjPrtsYUpNEtgsFQHTLLuRDCFVeF6p1sJ9WaughjYifGCKrsaEZJdvuRPVCZHnvHgZTLoJHjRdJz4Q1Yw5jJnZf4w2HZN
Public Key
2R7RRyEP2A4agg5rfY1HxPKhugqgDSnDmsbdZpkEcbeF: BHUVFvg4HJ1HH5btvJmNCpPvWjudZB3SH6BjUP2Nzbvt8BBidi7XKPzYMfxQAotxEHQtdFDaJt5kn1ChvgMjp9VTWuawfbdjq3L1hK3LhFh3ns6hafiHdA2fjTGg4UYiYPg9hY7T8ME8w5PF7VS6Z23HSjhn8y7MH3XNnLT3XBGvZiNa7v1wM6VzfSsUdSnc1n12i7tcqzE2bnnmQeBCZCekZJitktEkL2QFSciphRy7UcCzJ1ZpWN6aX9E3pRQ6T8ouAPpi8RE5LPbAfUZ97GyBZBauaKWenkHxWi6qytnxVSiX2AhR4hp4623vQ83eMTd9zqWNcH78oWu2eXzC6WPu3jHQ3ZgU2gAFZcnDsNa1s1u2TmZRHiePHJc194anqfQe7AVFV5XNAuXvNvSuuQ5viMv9APx1PLNBn