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.
Okay... I think I fundamentally get something out of Codewars that's different from you.
For me it's about fun challenges and previously was about interview prep, I'm not really competitively keeping score with the "honor", so googling a solution and providing it would just be cheating myself in my mind.
As for full test coverage of the O(1):
#1, As mentioned above, I think if you read this in the description and disobey it then you're just cheating yourself.
#2, I thought I had it with the "mins fast" test, and realized I didn't based on your feedback. I asked for your help, I suspect there's some built in way or a convention for testing Big O in Codewars.
As for whether or not the question itself is interesting, I think practice interview questions are pretty interesting to job-seekers, but hey people are different.
Happy to link to the leet code problem if you'd like but it sounds like you're unlikely to approve either way.
learned something new :), changed that
wait so I'm super confused, I think this is a perfectly valid Kata and am happy to fix the issues raised...
is it possible to unretire it?
I actually think marking a fairly common interview problem like this as "retired" because it's a duplicate of a problem on another popular site is a bad idea. I prefer Codewars and hope more people come to it, if people google the "min stack problem" and only Leetcode pops up then that's worse, agree?
I bet Djikstra's algorithm is on Leetcode too, should we take it off Codewars? :P
yea that person's a robot haha
hmmm okay, so I tried in the "mins fast" test to force the user to have to implement an O(1) solution, hoping that the submission would time out if they didn't.
Do you guys know any other way to test this aside from parsing their code submission?
oh so if it is a dupe that's honestly not intentional.
Kinda common interview question, I've given it before actually and just figured I'd put it on here since I didn't see it. :)
haha long time since I looked at this, thank you for feedback
yes at the time I wrote this I was learning what currying was and was actually wrong as you said. I do still think it's interestng though :)
will think about how to rephrase
hey there Voile, thank you, can you let me know what you mean? Perhaps give me an example of a random test or point me to a kata that has one visible in its example tests
Ah got it, yes i realize now that what im asking for is actually like an ES6 generator and that currying sticks with these pure functions like you've described, will fix
should be resolved
should be resolved
Okay, I tried to clarify the "this" handling, thanks!
Okay I tried to add some color to the handling of "this"
Thank you for your feedback :)
Oh I think I see, you would return a new function each time? So that the original function was not modified each time it is run?
If so, I think this is better, I'm wondering if it works to change it since it would make everyone's answers wrong haha.
Honestly I made this Kata to learn and am no expert on functional programming, is this not how currying kindof has to work in javascript (functions being first class citizens means multiple invocations necessarily produces intermediate functions)?
I don't know another way it could but would like to see some sort of quick mock-up or if you could point me to an example of what you think is better.
This comment is hidden because it contains spoiler information about the solution
Loading more items...