Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I will be waiting for your feedback after my update
I ran your code through my tests and saw a shortcoming on my end with the tests. I will fix it.
Thx for issue!
Your function starts caching only after the 25th call. In our task, caching should start from the first call.
Your function does not consider the maximum cache size. The task requires automatic removal of the least recently used entries when the cache size exceeds the specified limit
Your function does not manage the time-to-live (TTL) for cached entries. The task requires that entries expire and are removed from the cache after the specified TTL.
Perhaps I misunderstood your expectations and you were looking for a different response from me. How else can I assist you?
Thanks for the feedback.
I'll update the advice to mention that JSON.stringify
can be used
(i agree it's not the optimal solution), and I'll clarify that there are no tests withnull
,undefined
, or<empty item>
.Is there anything else you'd like to add?
Apparently, values passed to the memoised function do not need to be distinguished between
null
,undefined
and<empty item>
. This needs to be specified.I don't know that I agree with calling
JSON.stringify
"optimal". At best it's a highly unqualified statement.https://www.codewars.com/kata/reviews/665673f617d0626f2404bed5/groups/665681becee572ced3319e78
Okay, I can rework the task.
Johan is absolutely right. There are, in fact, several other kata that handle this specific task.
You're better off adding a translation to one of them.
https://www.codewars.com/kata/653c14997bcc1b23f6fbaf75
https://www.codewars.com/kata/54330fec913a650b640004b1
https://www.codewars.com/kata/59ffef8246d8434b0700001d
I have described the advantages of the method and where it can be used.
It's difficult to deny that our tasks are similar as they both utilize the memoization mechanism. However, my task is focused on universality, making the memoization function applicable to any function with any number of arguments. Your task, on the other hand, is focused on optimizing performance specifically for recursive functions.
You see more difference than there is. "Duplicate" does not mean an exact copy, it means there is too much similarity. There is too much similarity.
Note that you will never be able to resolve the "Duplicate" issue, so will never be able to republish the kata. Investing time in it is a nice exercise in kata creation, but this kata is doomed to remain in Draft.
Although both tasks involve memoization, the focus and intent behind each task are different:
Description extols the virtues of memoisation as if it has no downsides and isn't a balancing act between several resources, all of which are limited.
Fixed
Loading more items...