My Explanation: The second method performs significantly better. The first algorithm required much more time to finish, and this time increased as the value of x was increased. However, the time it took algorithm 2 to finish was never greater than 10 and did not rise as x increased.
Graphs + Explanation Graph 1
Graph 2
My Explanation: The second method performs significantly better. The first algorithm required much more time to finish, and this time increased as the value of x was increased. However, the time it took algorithm 2 to finish was never greater than 10 and did not rise as x increased.