45
Valentin Bryukhanov
http://bryukh.com/
Last seen 2 years ago
Member for 11 years, 7 months, 23 days
Difficulty Normal
Developer, engineer and taskMaker.
Great! I can read it without comments because the variables names are good chosen.
More
"\" for the new lines is not the best choice. You can use brackets if you want to break lines -- it's more readable imho. But in lines 38-40 is redundant.
More
"\" for the new lines is not the best choice. You can use brackets if you want to break lines -- it's more readable imho. But in lines 38-40 is redundant.
More
any([ch.isupper() for ch in data]) and
I prefer list comprehension. For memory problem, i can just to replace list comprehension to generator comprehension. If honestly, i don't like map and filter.
More
tab=recur(tab,value+1,x1-1,y1+2)
You can make it shorter and readable using a loop.
More
+ for percolate algorithm. But lines 20-39 can be shorten in function. Don't repeat yourself (DRY).
More
it's not fast -- i know, i can cached some variants for speed. But sometime i am lazy :)
More
Great solution. Simple for understanding. I agree with Kvas about Fraction -- slow thing. But this solution easy modified to float. So it's not important. Thank you for interesting solution.
More
It's not DRY (Don't Repeat Yorself). You can merge four block for moving in one loop or function. And "return" without anything is not good -- it's little confuse.
Good comments.
More