Skip to content

Conversation

@artemis-gen-ai
Copy link

Refactored the SumPrimes function for improved efficiency and edge case handling. Adjusted initial sum value to include the first prime (2), added a condition to return 0 for inputs less than or equal to 2, and optimized the loop to check only odd numbers starting from 3.

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