Implement Prime Factorization Function with Frequency Tracking #6
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 Prime Factorization Function with Frequency Tracking
Description
Task
Create Prime Factorization Function
Acceptance Criteria
Summary of Work
Overview
This pull request implements a robust prime factorization function that efficiently decomposes integers into their prime factors with frequency tracking.
Changes Made
is_prime()function for prime number validationprime_factorization()function with comprehensive features:Implementation Details
Prime Checker (
is_prime())Prime Factorization Function (
prime_factorization())Acceptance Criteria
✅ Uses prime checker function from previous implementation
✅ Includes frequency of each prime factor
✅ Handles edge cases and error scenarios
✅ Passes comprehensive test suite
✅ Efficient O(√n) time complexity
Testing Approach
Example Usage
Notes
ValueErrorfor invalid inputsChanges Made
Tests
Signatures
Staking Key
AEghvdqmRtc3fjKXfNTMJJ6WshksgWuJ9YBExgsZu8cN: 31o6fbMf3zoV8L8LzLe3McHmDK6Fzxupq1NK3F3suJE4pdgi3kA7M8y9K4zjtq2SKQS1qZ8GnhjTxvoP9SCYoJ4FaKDDHLNJH7K9Rq9SCp3FFRUnJdWo6KBUn2Vi3XUevD74Bn1rS8JYP1Yp7trvjXAMiPBpkJtAoaJwexeJ1FVkCxRzxYiMPkuMjG6Z3RhPNaJQc2WTg4Qze4hNfwRGLFfm6JDeQ6bs8wMkaCiRsXkT41hb2EuNH2BN9PzKKSMqfqxMtZxYJCXQRHsfovgBiLzWReHPFNCM3KsWeZYxe2Wq5vFBGZBbEBPUh7wyk7XEdqa6SQfkpcNVbLMo43Lxcg7sdpy1eNKPj5KrLrJynvuDxDsbaRsKiPDHzkwd5t2yb15YTWL27gUxrm2v5DFZbNSnaJgF8UwgZTe4
Public Key
AwXAtX7tMhL4JyB8NfXdsrqc1UifaMyap3c9bpN9RMse: 2dUJrjFZhAdJD4iNVS5UCkcyY4s4xPDih36FC1SJwhk9r7fsKvw61cX5jszfUStcaWJbaFa5CauCqUpv3K2biRhzJhpvumtfLf4Mn6BC9F7T36HBQzR8PddvbqQ5KAV7apBdAZs5uw6f1GrcXGMJyttGPDhKtCEQ7ydyosHrZcAKX2QGxUGs8arbCW6Vp37UqSXgLhcoXgEZsqwxrnco8W91QjBhXhQSdwxZbDmysyAyGb7cTc1Jgpa7FSKi76tXLuto5qeLEzqJ4zt7Dbn9X6Wrd3JWWsgJgjQUdqsNGtNm98G3D4bjtEQdmhk8YPQt2pfDByFNrD6q68PucUerirsnZmwBhyeGoGcYoyWtEo1NWzao7WnsJhZ3fDZzyZ45w1VYKNqYNDxPTqnaXofVQxP1NAjDzdHxBdbz