Beta
Multiple Arguments Memoization
Loading description...
Trees
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
It should be possible to run succeeding tests faster.
By delaying an initial run for a shorter period of time and running more repeat tests, non-memoising functions would consistently time-out but correctly memoised functions could return faster. That would improve the user experience. ( I am not at all a fan of test suites that take ~10 seconds, and I just don't think it's necessary here. ) You're running tens of thousands of tests in some cases, so large numbers of tests should not phase you.
That said, even with that improvement, I don't know if I'd be very satisfied with the kata. I think the approach of my kata, with a curried function decorated at every level, is simpler and works just as well. I'm also not a big fan of variadic functions, that may play into it.
The first description code block confuses
cube
anddouble
.Oh, and
mDouble
in the second block.Fixed. Thanks!
https://www.codewars.com/kata/reviews/653cd9d222c5f2000140cbfa/groups/653cfc1f629e300001dfd1bb
OK. Need more tests with arrays
Duplicate
Hi! I believe my kata has more strict requirements regarding function arguments and time complexity. Give me a chance :-)
https://www.codewars.com/kata/reviews/525481903700c1a1ff0000e4/groups/5b12959dfe77c3f8fb000200
JSON.stringify
is not welcomed here :-)Those "strict requirements" should be in the specification. Also, given that a kata that covers the same exact idea already exists, the description should mention the difference between the two.
I haven't opened the trainer yet, so I'll just assume you know what you're doing.
This kata is more interesting and challenging as the other. I would not deem it a duplicate. But if they are considered to be too similar, I would opt for removing the other one and keeping this one instead.
What is this for a test?
This comment has been hidden.
I just check the case when a function has an arbitrary number of arguments.
sumArgs(1)
should be cached as well assumArgs(1,2)
or evensumArgs()
This comment has been hidden.
ah great, good to know