19
tivvit
6 19 37
1903/ 2195
Last seen 2 years ago
Member for 11 years, 4 months, 12 days
Difficulty Normal
Best reviews / Newest reviews
First-johankor 1
Very effective and short solution More
First-PythonLearner 1
``` yield sorted_suffix[region_index] sorted_suffix.pop(region_index) ```` shorter version ``` yield sorted_suffix.pop(region_index) ``` More
First-thealfest1 1
Very short but readable solution More
Fizz Buzz-evca.mayerova
You can use 15 for the first condition More
The Most Numbers-evca.mayerova
sort is n log n, min and max is 2n More
dynamic programming-David_Jones
I like the use of map for converting pyramid to list More
Days Between-evca.mayerova
You can use abs instead of ternary More
Just simple flatten-obone
I like the usage of `setdefault` More
tryExcept-uaxz
You can use range iterator instead of while - then you can omit the `try` I like that you are doing it in-place More
Second-Gruggi
intersect is better than difference ;) More
Index Power-evca.mayerova
You do not have to use `len` array with and would be typed to boolean More
Non-unique Elements - one-liner-evca.mayerova
I do worry that Counter is created in each iteration More
First-Gazump
Nice solution You can check `if stack` instead of `if stack != []` More
Clear recursive solution-Gazump
Nice solution, you can also use yield for this task More
First-aashu0012
nice solution, I would return directly instead of using status variable and the else branch is not doing anything More
Monkey typing - one-liner-evca.mayerova
You can also go over the words (split by whitespaces and special chars) and search for them in the set, that should be O(n). More
Median-evca.mayerova
you can do slice of the array with 1 or 2 elements (`len(data) + 1 / 2` and `len(data) + 1 // 2` - boundaries) and then divide it by the len of the slice. IMHO it would be cleaner. More