Ad
  • Custom User Avatar

    Though in this case, the downvotes mostly come from the O(1) requirement not being enforced at all.

    This. Otherwise it looked good to me.

  • Custom User Avatar

    1st rule of TDD: the spec is practically defined by the tests, not how the description is written. If the tests simply allow any code to pass, then there are practically no specs, so of course the blame goes to the kata author of writing a dubious test fixture ;-)

  • Custom User Avatar

    As mentioned above, I think if you read this in the description and disobey it then you're just cheating yourself

    If you claim that something has to be done in a particular way, then your tests should ensure that the requirements are met. Otherwise, the design is simply bad.

    I suspect there's some built in way or a convention for testing Big O in Codewars

    The author should write tests which won't allow inefficient solution passing - there's no other way around.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Katas require random tests so users can't just pattern-match the input in the fixed tests.

    Most katas have random tests nowadays, so just solve one and look at how the tests are written ;-)

  • Custom User Avatar

    Well, in general katas about basic interview questions (or problems which source can be easily googled with answer directly read from there) are not very good kata ideas because

    • The answers are available everywhere
    • Usually they're not really novel
    • It tends to encourage people just plagiarizing problems from other sites to CW without attributions (which if you have noticed, consistitutes a non-trivial part of approved katas). This is really hairy as it quickly approaches the "copyright issues" territory

    I typically raise an issue about the 3rd point if I happen to find the exact source because attributions are important.

    Though in this case, the downvotes mostly come from the O(1) requirement not being enforced at all. It's up to the kata author to make sure everything works and there are full test coverage before publishing ;-) If it gets retired, rework on the kata again and try again, but if the idea itself is not very interesting to begin with, the second try might not be very successful either.

  • Custom User Avatar

    learned something new :), changed that

  • Custom User Avatar

    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

  • Custom User Avatar

    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?

  • Custom User Avatar

    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. :)

  • Custom User Avatar

    Lack of attribution is a problem though. Unless you want CW to be copyright striked ;-)

    There are too many katas out there that's just straight out ripping off other site's content with attribution, and it should never be encouraged in the first place.

  • Custom User Avatar

    You'll have to fix it in a new kata, looks like.

    I unvoted; it would just cost you points now.

  • Custom User Avatar

    Solved the retirement way .. :/

  • Custom User Avatar

    Lack of attribution might be a problem, but I don't think declaring duplicates for offsite kata makes sense, does it?

    Also, raising issues on retired kata isn't really necessary either.

  • Custom User Avatar

    This looks like a duplicate to https://leetcode.com/problems/min-stack/description/ ;-)

  • Loading more items...