Monday, July 24, 2017

Maximum Gcd and Sum (III)

July 24, 2017

Introduction


"Maximum Gcd and Sum" is the algorithm related to great common divisor, and prime number technique called sieve of eratosthenes is used in the optimal solution.

The algorithm is the first medium level algorithm in week of code 34 on Hackerrank. Julia spent more than a few hour in the Saturday of July 21, she did not come out the solution to fix the timeout and run time error issue.

Here is the optimal solution after the study of editorial notes.

Plan to do time complexity analysis on test case 1, 400,000 is the length of testing array.


No comments:

Post a Comment