Ad
  • Default User Avatar

    the variable names are cheff's kiss

  • Default User Avatar

    upon viewing other solutions I finally realized that I have mistakenly thought of "memoization" as precompute the answers according to the given size of question (due to my lack of computer science knowledge), but it seems like perhaps the correct interpretation is to update a memo list upon each function call so that each computation can be simplified; however even if that is the case, the worst case scenario is that we still need a method to compute the 250-th term even without previous calls, which still seems extremely difficult at first glance.

  • Default User Avatar

    this sort function usage is just astounding.
    this concise lambda function definition is such a compact expression of the output rule given by the question.