22
narimiran
7 24 41
2885/ 2945
Last seen 5 years ago
Member for 8 years, 4 months, 15 days
Difficulty Normal
Would like to receive comments/critics of my published solutions.

Best reviews / Newest reviews
Jarvis March that includes collinear pts on hull-kkkkk 1
Line 29 - even without `key`, `data` will be sorted by the first element then by the second. More
First-SiLiKhon -1 1
Instead of returning `i + 1` (line 6), you could have passed `1` as a second argument to the `enumerate` function (line 4), which is a starting index (the default value is 0), and then return just `i`, which is more elegant. More
Recursive with pruning-ottosmo
Line 4 is easy to write manually when you have only three numbers, but what if you had more? Take a look at `itertools` module, it is very useful in many situations.... (here you could have used `itertools.permutations(range(3), 3)` ). More
Permutated generator-narimiran
Lines 7 and 8 - the first triangle from the input is always used as a starting point, only others are permuted. More
First-990099
Why didn't you use the same logic for `max` as you did for `min`, with the only difference that you pass `reversed=True` as another argument to the `sorted` function? More
First-keita.tmzw
You could have avoided duplicated code in two branches depending on the length of `args` with something like this: input_ls = args if len(args) > 1 else args[0] Now lines 3-13 and 29-39 are not needed. More
I think, we can do this shorter-Ballistik
If you want shorter, lines 3 and 7 could be a bit shorter: sorted(args if len(args[:-1]) else args[0], ... For even shorter, take a look at [my solution](https://py.checkio.org/mission/min-max/publications/narimiran/python-3/minmax/) ;) More
Simple-MasterN 1
Most of the code is duplicated in both functions - you could have used a helper function, which would be called from each function (at least for lines 2-7 and 14-19, if not even more). More
Bacteria Colonies-narimiran
`get_size` is trying to grow every existing cell into a healthy colony. If successful, it returns the size of colony, otherwise (unhealthy colony is grown) returns zero. More
First-Freezedr
In the function `is_triangle`, instead of three ifs for different cases, it might be better to sort the values and just compare two smallest with the largest one, for example: def is_triangle(a, b, c): a, b, c = sorted(a, b, c) return a + b > c More
First-karolk10
Instead of the function `o`, you could/should have used built-in function `round` - it would have saved you some trouble. More
First-o_Orlova
Last three lines could be replaced with just: `return abs(days)` More
First-klaganowski
Last three lines could be replaced with just: return abs(days) More
First-Stanislaw_Szataniak
There's a built-in function `bin` to convert numbers to binary, no need for reinventing the wheel ;) More
First-DmitriyGordon
There's a built-in function `bin` to convert numbers to binary, no need for reinventing the wheel ;) Also: for i, j in enumerate(nb): if j != mb[i]: you might want to use `zip` in the future: for n, m in zip(nb, mb): if n != m: More
the hamming distance-jacek.maciupa
for i in range(len(binN)): if binN[i] != binM[i]: Instead of this, more Pythonic way would have been: for n, m in zip(binN, binM): if n != m: More
I couldn't figure out the sorted() function-chilllaxer
You might want to check Python's `sorted` function, it has a `key` argument which would have been very useful here. More
Sorted by loving lambdas-8t-one 1
You can directly pass the `abs` function, without a need for loving lambda, just: `key=abs` :) More
First-helga2work 1
You can directly pass the `abs` function, without a need for lambda, just: `key=abs` :) More
First-tjsanfo
You should avoid naming your variables as python keywords, in this case - `list`. More
1
2
3 4 5 6 7 8 9 10