28
quarkov
11 32 56 Leader of the month
4384/ 4445
Alex Mahotin
Last seen 3 hours ago
Member for 6 years, 1 month, 19 days
Difficulty Normal
Engineer (3D modelling, 3D printing).

Best reviews / Newest reviews
Using non-recursive GCD-Oksana_Antropova 1
Python math module has its own implemented gcd function, so you might drop out lines 4-7 and add one extra line with import. Good reduce usage. More
Binary search-djilka 1
This solution would be speedy if given _values_ would've been a list instance. Here you sort the given set at first and then convert it to a list which takes time. More
iteratively-Oleg_Skomorokhov 1
I like your solution itself, it's very accurate IMO. Can't say so about the comments. I understand your intention to make it clear for newbies but it works in reverse, leaving your code unclean. Have a look at the lines 6, 7 or 3, 4 e.g. Is there a need for such a comment? Code and comments ha More
bfs-fokusd 1 1
Try "}}}()" case. This solution won't go through. More
First-Diego_Hernando_Useche_Reyes 1
Since it's defined that 0 < xi, yi, r < 10, your way of data parsing works however it's not consistent for an arbitrary data value. Probably it's better to use re.findall: [x_1, y_1, x_2, y_2, x_3, y_3] = map(int, re.findall(r"\d+", data)) Or even consider this option: (x_1, y_1), (x_ More
First-kostya241
Good approach. A few things to point out at: 1.It's better to avoid naming variables "l" when possible because "l" is barely distinguishable from "1" (one). 2.It's possible to fold lines 3-7 into one using pythons ternary operator: return data[(l // 2) - 1:(l // 2) + 1] if l % 2 == 0 else More
With numpy rot90()-IlyaSemenov
I like numpy. Even though it works a bit slow (at least on my pc) - very convenient for matrixes handling. More
First-Tinus_Trotyl
The most readable solution I've seen for this puzzle. More
First-brownie57
Like your solution. Did you not use enumerate in line 4 intentionally? More
Fourth-ojisan 1
Very concise and clear. Perhaps, you might also consider .zfill method as an alternative to _" " * (mx-len(l))_ More
First-7nat7
I leave aside str.translate() method and conversion a str into a set as I believe you have already seen those solutions. You could inverse your solution logic and come up with something like this: def isometric_strings(str1: str, str2: str) -> bool: if len(str1) != len(str2): More
solving step by step-sureshamrutham91
Hi there, I have several suggestions on how to improve your code and some tips which would help you in future=) **The first part is about how your solution is looking.** -Using _print_ for debug purpose isn't that bad, but leaving it in your code after debugging isn't good. It's cluttering the More
First-maxnrg
We can use an analytical approach to solve this task with O(1) time complexity. Pigeons count for every minute is 1, 3, 6, 10, 15 ... Which is the triangular numbers sequence or **a(i) = (i+1)\*i/2** Fed pigeons count for every minute is 1, 4, 10, 20, 35 ... It's the tetrahedral number More
ᗧ···ᗣ···ᗣ··-vmiimu
Although this solution looks pretty short, using re is not a good idea in terms of resources. Re engine is very greedy for such a purpose, which is even reflected in the [python doc](https://docs.python.org/3/howto/regex.html): "Sometimes using the re module is a mistake. If you’re matching More
Cipher Solution-Mordokh
_encrypted=encrypted+chr(ord(i)+delta+26)_ could be reduced to _encrypted += chr(ord(i)+delta+26)_ More
1 Line-Dezite
Now I'm learning to use regexes instead of longread clumsy code, thanks. More
short and clear-StefanPochmann
.split method had been used to avoid an excessive using of the quotation marks or I missed something more important? More
Keep it simple-StefanPochmann
This one should be on the top. Really appreciate it. More
With comments-Eric_Meyer
Hi! I have a few thoughts on how you could improve your solution. 1. For lines 5-6. There is no need to find lenght of [intervals]. Here's a better way to check this. _if not intervals: return intervals_ 2. For line 11. It could be reduced to _output = list(intervals[0])_. 3. For lines 1 More
First-Vasily__Chibilyaev 1
Like it. I solved this task in a similar way, but I didn't use intervals.pop(), this way initial data remains intact, which is better. You might have [a look](https://py.checkio.org/mission/merge-intervals/publications/quarkov/python-3/simple-solution/) if you're interested More
1
2
3