38
StefanPochmann
16 39 54 Leader of the month
9142/ 9195
Last seen 25 minutes ago
Member for 9 years, 1 month, 21 days
Difficulty Normal
Recent solutions I'm happy with (just starting/trying this): [Words Order](https://py.checkio.org/mission/words-order/publications/StefanPochmann/python-3/short-dict-subsequence/share/5bbb2df54ec5a810d36d7f70ae7e92da/) Dang it no markdown here?

Best reviews / Newest reviews
Maybeline-veky 1 1
Hmm... how did you get that here? The function name is wrong, the return type is wrong, and I just tried it and it does get rejected. Edit: Ah, [I see](https://py.checkio.org/forum/post/12041/new-mission-the-highest-building/) that was apparently the original format. Does CheckiO not rejudge soluti More
Shorter than htamas'-StefanPochmann 1
This one is one char longer, but equally long in Python 3 because it only has one division: checkio=c=lambda a,b:a and[2*b,2**~-len(bin(b))-2][a%2]+c(a/2,b) More
Shorter than veky's-htamas 1
Got a [shorter one](http://www.checkio.org/mission/multiplication-table/publications/StefanPochmann/python-27/shorter-than-htamas/). Recursion ftw! Btw, I saw your nice Google Code Jam solutions recently, then googled you, and that's how I found CheckIO. Which I now like a lot. So thanks :-) More
1-liner: 59 chars-przemyslaw.daniel 1
Save two chars: ``` [x]+[0]*(x==0) [x,x][x!=0:] ``` More
max len of dict-veky 1 1
Just a variation... long_repeat=lambda l:max(map(len,__import__('re').split(r'((.)\2*)',l))) More
Pochmannia!-veky 1 1
Hmm, now what to do with this... I gave the original +5 for its neat insight/algorithm. I do like this version better, but it didn't give me that same Aha! moment again... More
First-panaro32 1 1
Very nice! Just three things: 1. You could say `'SENW'` instead of `['S','E','N','W']`. 2. The `or ''` is useless. 3. You could use `x==y==10`. More
(em)powering-ale1ster 1 1
Nice one, although using `enumerate` would've been better. More
Simple BFS-ale1ster 1 1
Hmm... you never put anything in "visited". More
Counter-wise counted-Tinus_Trotyl 1 1
You [reinventor](https://github.com/python/cpython/blob/de7a2f04d6b9427d568fcb43b6f512f9b4c4bd84/Objects/listobject.c#L2306-L2314) :-) More
if total else data-veky 1 1
I'd say removing less than nothing shouldn't remove *everything*, like this does for `remove_min_max({1, 2, 3}, -1)`. More
uno reverse card-viktor.chyrkin 1 1
Inspired by yours: def remove_min_max(data: set, total: int) -> set: for extremum in [min, max] * total: data.discard(extremum(data, default=None)) return data More
Boring-veky 1 1
Wat. Dat line 14. You must've been veeeery bored. More
8-liner: simple-przemyslaw.daniel 1 1
You could use result += (data[0], data[size]), which is one character shorter and probably slightly faster. Well I guess in an O(n^2) solution you don't care about efficiency much :-P. But this is always a great way to confuse/educate people :-D More
Generator-veky 1 1
How about... def merged(intervals): if intervals: it = iter(intervals) a, b = next(it) ... More
Simple-StefanPochmann 1
Explanation: For each center cell c, go through all cells and count the bacteria at each Manhattan distance. Then use that to find the smallest non-full "ring" around it and if that ring is empty, we found the radius of the colony. It's not efficient, but it is simple (and it doesn't have to be eff More
Generator Fun-StefanPochmann 1
In Python 3.4 I'd make `[]` the max-default. More
from itertools import not compress-veky 1 2
Inspired me to do it **with** it, here's one version: ``` def compress(items): from itertools import compress, tee, chain, starmap, pairwise from operator import ne a, b = tee(items) return compress(a, chain([True], starmap(ne, pairwise(b)))) ``` Another: ``` def compress(items): More
Beans for Breakfast-eraserhead88 1 1
This seems quite buggy. Some test cases (with input, what I'd expect, and what you return): ``` 'ud' None 0 'udd' None 1 'dud' None 0 'udud' None -1 'uddd' None 2 'dudd' None 2 'ddud' None 0 'ududd' None 0 'uddud' None -1 'dudud' None -2 'duddd' None 4 'ddudd' None 4 'dddud' None 0 'ududud' None -1 More
Dunder, map, lambda, sum(bool)... oh my!-veky 1 1
[You're a bit late](https://py.checkio.org/mission/monkey-typing/publications/StefanPochmann/python-3/sum-map-__contains__/) :-P More
1
2
3 4 5 6 7 8 9 10