14
maxnrg
● 1 ● 15 ● 29
896/ 945
Last seen 2 years ago
Member for 4 years, 6 months
Difficulty Normal
https://github.com/MaksymSkorupskyi

Missions (56) / Solutions (84)
Best solutions / Newest solutions
Initiation
First - silce indexes
Between Markers (simplified)
index
str
Second - text.split(maxsplit=1)[0]
First Word (simplified)
split
str
First - split()
First Word (simplified)
split
str
First - dot only
Correct Sentence
f-string
upper
inline-if
str
Second - universal
Correct Sentence
f-string
upper
inline-if
str
1
First
Easy Unpack
tuple
First
All the Same
Any
typing.Any
List
typing.List
bool
1
Home
First - datetime.date(), datetime.timedelta().days
Days Between
Tuple
typing.Tuple
date
datetime.date
datetime
1
v3 - find() and slice 3 lines
Between Markers
find
inline-if
and
split
str
1
v2 - find() and slice
Between Markers
find
and
split
str
len
First
Between Markers
find
and
split
str
if
Third - split() and count() one-liner
Popular Words
collections.Counter
Counter
dict-comp
dict
collections
Second - - split() and count()
Popular Words
collections.Counter
Counter
dict-comp
dict
collections
First - split() and Counter()
Popular Words
collections.Counter
Counter
dict-comp
dict
collections
Second - sorted(data, key=itemgetter('price'), reverse=True)[:limit]
Bigger Price
Dict
typing.Dict
itemgetter
operator.itemgetter
operator
v1 - return sorted(data, key=lambda i: i['price'], reverse=True)[:limit]
Bigger Price
Dict
typing.Dict
List
typing.List
typing
1
Second - re.search('([a-zA-Z]+ ){2}[a-zA-Z]+', words)
Three Words
re.search
search
re
bool
str
First - re.search('[a-zA-Z]+ [a-zA-Z]+ [a-zA-Z]+', words)
Three Words
re.search
search
re
bool
str
Third - RegExp
First Word
findall
re.findall
r-string
re
str
1
Second - str methods: replace(), split()
First Word
replace
split
str
1
First - replace(), strip(), split()
First Word
strip
replace
split
str
First - index() & count()
Second Index
index
None
count
inline-if
int
3
First - join + replace
Right to Left
Ellipsis
Tuple
typing.Tuple
replace
typing
First - slice & sum
Even the Last
inline-if
sum
1
First - chr/ord O(n)
Pawn Brotherhood
f-string
chr
ord
set
or
1
First - pretty straightforward ))
Sun Angle
int
str
if
1
4th no Counter
Sort Array by Element Frequency
dict-comp
lambda
count
sum
sorted
#3 optimized Counter comprehension
Sort Array by Element Frequency
collections.Counter
Counter
collections
sum
list-comp
1
2) optimized Counter
Sort Array by Element Frequency
extend
collections.Counter
Counter
collections
list
Counter
Sort Array by Element Frequency
collections.Counter
Counter
collections
append
range
count() list comprehension
Non-unique Elements
count
if-comprehension
list-comp
list
comprehension
Electronic Station
First str int
Digits Multiplication
int
str
for
if
1
Scientific Expedition
First
Letter Queue
startswith
List
typing.List
typing
elif
# v2 - title() + replace()
Conversion into CamelCase
title
capitalize
replace
join
split
#v1 - capitalize() + split()
Conversion into CamelCase
capitalize
join
split
comprehension
str
1
Second - optimized
Cipher Map
Ellipsis
Tuple
typing.Tuple
tuple
zip
First - rotate(cipher_grille) four times
Cipher Map
Ellipsis
Tuple
typing.Tuple
tuple
zip
First - sorted(numbers_array, key=abs)
Absolute Sorting
tuple
abs
sorted
list
1
First comprehension
Secret Message
isupper
join
if-comprehension
comprehension
str
First - flag + counter
Bird Language
continue
in
elif
False
True
no datetime
Time Converter (24h to 12h)
f-string
int
str
if
Counter
The Most Wanted Letter
collections.Counter
Counter
collections
isalpha
lower
1
O'Reilly
First - straight
Median
float
List
typing.List
sort
typing
First
Index Power
list
int
len
if
Third - matrix transpose for columns check
Xs and Os Referee
List
typing.List
zip
typing
in
Second - lazy, a little bit optimized ))
Xs and Os Referee
List
typing.List
typing
in
str
First - lazy and pretty straightforward ))
Xs and Os Referee
List
typing.List
typing
and
str
Second recursion
Flatten a List
isinstance
extend
append
list
else
1
First - recursion
Flatten a List
isinstance
extend
elif
append
list
Incinerator
First - simple
3 Chefs
ABC
abc.ABC
abc.abstractmethod
abstractmethod
abc
First - Strategy Pattern - Geometry Figures
Geometry Figures
ABC
abc.ABC
abc.abstractmethod
abstractmethod
abc
Second - state @property
Text Editor
class
property
decorator
f-string
None
Second - list of deepcopy(text), self.font optimized
Text Editor
class
copy.deepcopy
deepcopy
copy
f-string
First - list of deepcopy(text)
Text Editor
class
copy.deepcopy
deepcopy
object
copy
Second - move vampirism logic to Warrior class.
The Vampires
Type
typing.Type
class
staticmethod
property
First - had to modify the base class Warrior
The Vampires
Type
typing.Type
class
staticmethod
property
First - documented and clear I hope )
The Defenders
Type
typing.Type
class
staticmethod
property
First
Army Battles
Type
typing.Type
class
staticmethod
property
Third - optimised
The Warriors
class
property
decorator
bool
not
Second - fix property boolean logic :)))
The Warriors
class
property
decorator
bool
not
First - basic OOP
The Warriors
class
property
decorator
bool
not
Mine
Second - max(stocks, key=stocks.get)
Best Stock
get
dict
max
str
1
First - simple iteration
Best Stock
dict
items
str
for
if
1
First
Fizz Buzz
not
and
int
str
if
Ice Base
First
Feed Pigeons
max
while
int
1
First- max(args) - min(args) if args else 0
The Most Numbers
min
max
inline-if
First - brute force O(n)
Long Repeat
None
max
else
int
str
1
Alice In Wonderland
First - len(text) % 2, len(text) // 2
Middle Characters
inline-if
str
len
v2
IP Network: Route Summarization
ljust
f-string
format
List
typing.List
First - str > int > bin > longest_common_prefix > int
IP Network: Route Summarization
ljust
f-string
format
List
typing.List
GitHub
5th - assert create_intervals({-1, 0, 1, 12}) == [(-1, 1), (12, 12)]
Create Intervals
typing.Set
Set
Tuple
typing.Tuple
List
# v3 - calendar: isleap, weekday, day_name
The Most Frequent Weekdays
calendar.isleap
isleap
calendar.day_name
day_name
calendar.weekday
# v2 - isleap and weekday leap/non-leap year
The Most Frequent Weekdays
calendar.isleap
isleap
calendar.weekday
weekday
calendar
# v1 - datetime.date leap/non-leap year
The Most Frequent Weekdays
date
datetime.date
datetime
List
typing.List
v4 - `starts` and `ends` iterators
Create Intervals
typing.Set
Set
Tuple
typing.Tuple
List
v2 - `begins` and `ends`
Create Intervals
typing.Set
Set
Tuple
typing.Tuple
List
v1 - straightforward iteration through sorted(data)
Create Intervals
typing.Set
Set
Tuple
typing.Tuple
List
Dropbox
First - max(words, key=lambda word: sum(VALUES.get(w) for w in word))
Worth of Words
get
max
lambda
sum
comprehension
PyCon TW
v2, v3 - build a pyramid of max possible sums in a path from bottom to top
Golden Pyramid
Ellipsis
Tuple
typing.Tuple
enumerate
max
First - build pyramid of max possible sums in a path from top to bottom
Golden Pyramid
Ellipsis
Tuple
typing.Tuple
enumerate
max
First
House Password
re.search
search
re
bool
False
Blizzard
First - re
Stressful Subject
endswith
re.search
search
r-string
isupper
Watchtower
Second
Compare Functions
typing.Callable
Callable
is
None
except
First
Compare Functions
typing.Callable
Callable
is
None
except