14
timqsh
14 27
866/ 945
Тимур Кушуков
Last seen 2 years ago
Member for 5 years, 4 months, 26 days
Difficulty Normal
Best reviews / Newest reviews
Not the longest but still the same-veky 1 1
```python indices = set(range(len(matrix))) ... while {i, j} <= indices ``` That's a cool trick. Not as efficient as ```python n = len(matrix) ... while 0<=iMore
List comprehension, but multi-line :(-spitfire_ch 1 1
Nice and short :) But it has O(N*M) complexity because for each word in words it scans elements with index function. It can be improved to O(N+M) using 2 pointers technique More
One string with RegEx-RomanTT
You can simplify to return bool(re.search(r'[A-Za-z]+\s[A-Za-z]+\s[A-Za-z]+',words)) More
First-frbrgeorge
You can use "ascii_lowercase", "ascii_uppercase" and "digits" variables from "string" module. Less typing ;) More
First-dmitry.lyubenko 1
Nice solution, here some posible improvements. You can use: 1) operaror.itemgetter instead of lambda. It is faster and more readable. 2) reverse=True as sorted parameter ;) More
First-BigDaiTJ 1
"if key in counter.keys() else 0" part is unnecessary. Counter of unknown key equals zero by default. More