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

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