5 kyu
Stable Weight Arrangement
42 of 85docgunthrop
Loading description...
Arrays
Algorithms
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.
Challenging and complex to figure out at first, I really like this one.
( JS )
Preloaded
line17
tries to updateTest
. That is the only thing preventingNode 18.x
.Please remove
Test
from that line and set version toNode 18.x
.I'd do it myself, but I am in awe of the boilerplate and I don't dare touch it.
Fixed and updated to Node 18.x.
What should be returned if there are solutions? It's not stated in the description; should we return any solution, or all solutions?
Fixed.
A very nice Kata!
Finally !! Thanks it was fun.
Elixir and C# translations to come...
Time-outs occurring in JS and Python.
Reduced number of random tests from
40
to25
across the board on all translations. Not the preferred solution, but it has yielded a massive improvement wrt time-outs.I can't really put my finger on it, but it doesn't feel original.
Can anyone point at a duplicate, or is it just that the way of solving is applicable to lots more problems?
It's well and nicely implemented and this is not a stab at you Doc. This is not an issue. But I got that nagging Fibonacci feeling. ( Maybe I've just done too many kata on here. )
I can't think of how this could be a duplicate, but also don't know what to search.
After all, you're #6 on the completed kata leaderboard.
I've also completed a lot of kata and I don't believe I've ever come across a kata like this. You will likely use some familiar approaches to solve it, so it may seem familiar. If you do happen to find a duplicate (or a kata that comes close enough), feel free to post it here and I'll have a look.
My original goal for this kata was to go for performance, but I have yet to find the magic formula, so this is one I consider a relatively simple kata.
I didn't find the magic either. Maybe someone will. It is a fun one!
And it probably just seems familiar.
( JS )
Random tests sometimes take less than 200 ms - and sometimes time out. ( My solution tries to optimise for best cases. )
I don't know what ( if anything ) can be done about that, but if anybody can think of something, I think it would be better to have more consistent runtimes.
Thanks, I'm working on getting this fixed.
( JS )
Would you mention in the Description disabling
require
and ( some ) other anti-cheats?. I don't disagree with it ( though I occasionally like to useramda
), and completely specifying what can't be done isn't necessary, but silently limiting us to a subset of, after all, valid JavaScript isn't necessary either.Thank you for not freezing
Array.prototype
! :yum:Looks like I made a typo by writing
requests
instead ofrequire
in the Description; it's now fixed.The other only limitations are some built-in prototypes are frozen, but ones that users typically don't modify (e.g.
Boolean
,Date
,Math
,...)It's entirely possible I just missed that line, typo or not.
This will do nicely. Thank you.
JavaScript and Go translations to come.
JavaScript translation published.
Go translation published.