Ad
  • Custom User Avatar

    As this question was given to me in an interview setting, I kind of wanted to go for the 'discover the best approach' sort of problem solving. However, I see that you are right in that there are not many hints given to guide people to the expected solution.

    If possible, I would like for people to be able to look at the Discourse section if they are having issues and be able to research the method by which to solve the problem by themselves. Your comment itself serves as a pretty good signpost, but if the general consensus is that the memoization technique should be explicitly mentioned, then I can add that to the kata description.

    Thanks for your feedback!

  • Custom User Avatar

    The kata has a worst case complexity of O(n^2) and therefore a timeout is expected for longer lists. The use of memoization to avoid timeout is simply due to careful selection of test cases and as such, is not a critical component to the algorithm. I would recommend either removing long list test cases or emphasizing the use of memoization in the wording of the question.