8
Last seen 3 years ago
Member for 8 years, 9 months, 27 days
Difficulty Normal
You're clearly technically proficient, but try to think a little creatively about "what are my obstacles" and "what information do I need to have to overcome those obstacles"?
More
Recursion! It came out a little more complicated than my iterative solution, but I always love to see a recursive solution.
More
I'll be honest - I'm having trouble reading your code. But it does look like you have a lot of loops...
More
I tried to implement this, but I didn't know how to pull off your code in line 5. Creative!
More
I used the same algorithm, but this is beautifully written. Is it better (pythonic?) to have fewer, longer lines of code than more, shorter lines?
More
This works?! It looks like this breaks every ring but one. Can you explain the algorithm intuitively?
More
Is
checkio = Anything()
the same as
def checkio(anything):
return Anything()
?
More
Ah, a while loop in a for loop! Nice idea. I put my for loop in my while loop, leading to some unnecessary iteration.
More
I had the same solution, but with two arrays instead of a 2D tuple. I like this a lot, though!
More
You had the right idea with making tuples for numbers and letters, but then did the subtractive values by hand! Oy! You could have saved yourself some effort there.
Nice use of string formatting!
More
Use another array for values and you can simplify the whole process. Also, think in terms of Roman Numerals, rather than decimal, to find a quicker solution.
More
Think in terms of Roman Numerals instead of in decimal and you can find a simpler solution. Also, only use break/continue as a check for preconditions. Leaving them around like that can be dangerous for more complex programs. This is pretty good, though. Well done! Nice use of a dictionary!
More
I gotta learn how to use itertools. This is the code I wanted to write when I made the mess I actually wrote.
More
Oooh, a whole new class. I thought about doing it since that's how I've done graph searches in the past, but it seemed like overkill. Would've saved me time, in retrospect. I basically used the same algorithm but built it from scratch inside the main method instead of doing it the smart way.
Props!
More