Answer it
P2 b2 leaderboard compare
4 marksYou mark it yourself against the marking points
The puzzle game finds the highest score among the first n scores with a recursive function, best_score(scores, n), which calls itself with n - 1 until n is 1. A programmer suggests replacing it with a loop that walks through the scores once and remembers the highest seen so far.
Compare the recursive best_score with the loop version, referring to time, memory and clarity. [4]