36
nickie
● 14 ● 32 ● 45
7469/ 8195
Last seen 11 months ago
Member for 10 years, 7 months, 24 days
Difficulty Normal
Best reviews / Newest reviews
First-Tubis
Not same, but alpha equivalent again... :-) More
First-htamas
Almost identical, except for the list equality; I used "all", which may save you the trouble from generating the whole LHS. Well done! More
Straightforward-nickie 1
IMHO: clear, readable, **un**documented and educational. :-) More
First-bukebuer 1
Is this speedy? [:Suspicious looking emoticon:] More
Closure-veky 1
Well done! Just a comment: this solution is O(N\*log(N)+N\*W) where W is the maximum width of the buildings. IFAIK, there are two types of better solutions (but more complicated, unless Veky surprises us again): 1. O(N^2), using a pretty straightforward vertical scan line. 2. O(N*log(N)), More
Professional-veky 1
What I'd have in a professional solution would be memoization for the results of "possible\_values", or even better dynamic programming. For those who do not understand what I mean, consider how many times possible_values("33") will be called during checkio("593347"). If the string becomes larger, More
Blobby-Anne29
About your "pad" function, lines 4 to 12, a nice trick that I learned here is that you can get away with padding your matrix only to the right and bottom, i.e. (if you do it in-situ) def pad(m): m.append([0]*len(m)) for row in m: row.append(0) This works in Python because More
First-takapt0226
Nice solution and nicely coded. More
Second-bryukh 1
Clear and correct. The drawback is that it can use too many steps to get to the ore. More
Straightforward-nickie
This solution works by translating dot numbers to coordinates. In this way, it first finds the set of edges. Then, it exhaustively counts how many of all the possible squares (of increasing size) are present in the set of edges. This is painfully slow. If the size of the grid is N, this is O(N^ More
Using `filter`-BertrandBordage 1
I like this solution, but "speedy"? More
Sort and search-nickie
This solution was fixed; it had a stupid bug pointed out by Bryukh. Take a look at the [new one](http://www.checkio.org/mission/painting-wall/publications/nickie/python-3/fixed-sort-and-search/), if you want. More
Straightforward-nickie
This solution takes O(N\*M), where N is the length of text and M is the total length of all words. I believe this can be improved to O(N+M). More
break else break-veky 1
The "break else break" part merits [some further study](http://docs.python.org/3/reference/compound_stmts.html#the-for-statement) if you don't know that Python has an else clause for loops (as I didn't). Until then, I thought that somebody hacked Veky's account and published this puzzle for him. A More
Decimal FTW-veky 1
Why do I have the feeling that if you remove lines 4 and 5 nothing will change? Is this a puzzle after all? :-) More
First-rou6 1
Nice, but how about len(data) == 0 (i.e. data is [])? More
1 2 3 4 5 6 7 8 9
10