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.
Your code fails for 143 = 13 * 11, or other numbers which have prime factors other than 2,3,5 and 7
Good for simplicity, bad for your algorithm knowledge.
Solved
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.
Don't you just love how Python does most of the work for you? ^_^
@stealthguy Don't worry I felt the same way particularly when I hit convert("hello", allow, hex) # 320048
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.
@stealthguy I don't even see katas you authored when visiting your profile. Have you deleted them?
in link you gave a === 1, in this kata a === 0
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...
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!
This comment is hidden because it contains spoiler information about the solution
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.
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
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...