Ad
  • Default User Avatar

    Your code fails for 143 = 13 * 11, or other numbers which have prime factors other than 2,3,5 and 7

  • Custom User Avatar

    Good for simplicity, bad for your algorithm knowledge.

  • Custom User Avatar

    Solved

  • Custom User Avatar

    Yes, but here also some solutions should be filtered out.
    Or there should be better guidelines how to write tests, to not let cheat them in many different ways.

  • Default User Avatar

    Don't you just love how Python does most of the work for you? ^_^

  • Custom User Avatar

    @stealthguy Don't worry I felt the same way particularly when I hit convert("hello", allow, hex) # 320048

  • Default User Avatar

    It appears that the alphabets are indexed from 0, so z would be 25, a, 26, and b would be 27 if iterating past the last element restarts at the first element.

  • Custom User Avatar

    @stealthguy I don't even see katas you authored when visiting your profile. Have you deleted them?

  • Custom User Avatar

    in link you gave a === 1, in this kata a === 0

  • Custom User Avatar

    Sometimes readability is more then fast execution. But yes I totally agree to you. I signed up here because I wanted to see not just how others solve some problem but also what solution is considered "best" by majority. Then I expected there to be microforum for every kata where discussion about why this and that is better. Simple "best practice" tag without comments are often not there yet. There is lot of work to be done...

  • Default User Avatar

    There needs to be a better way for newer solutions to get upvoted.

    I feel that some of my solutions are done better than some of the top voted solutions, but I'm at the end of the pile behind everyone and their mother who just started learning (no offense, this is a learning environment which I support). So no one will look at my code and upvote/comment/critique.

    It would be so much better if solutions could be sorted by runtime or overall efficiency, instead of upvotes.

    Thanks!

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    You are making the mistake of saying that strings can't be iterated without converting to list.

    You can already do roman[::-1] perfectly fine on any string. Strings are essentially an array from characters. You have C to thank for that.

  • Default User Avatar

    Top rated algos are more complicated than needed...

    I'm surprised as to how the top rated is... well... the top rated.

    Please check out my algo for a much cleaner and KISS implemented algo, and rate if you can.

    Roman Numerals Decode KISS algo

    Thanks

  • Default User Avatar

    My solution overall satisfies the conditions that the cache be only accessible to the function itself. But I did not use memoize. I didn't even realize what they were talking about, so I just did the next best thing, pass by reference. Well, not exactly passing by reference, and I can see it taking up some memory for larger calculations. However I think it's really good for a solution. Check it out

  • Loading more items...