23
brubru777
8 23 36
3032/ 3195
Last seen 2 years ago
Member for 8 years, 8 months, 13 days
Difficulty Normal
Missions (199) / Solutions (210)
Best solutions / Newest solutions
Initiation
Short and fast
Split Pairs
inline-if
list-comp
range
comprehension
len
1
2
Clear and efficient
Beginning Zeros
enumerate
int
str
len
for
14
Short and easy
The Most Frequent
collections.Counter
Counter
collections
Short and efficient
Nearest Value
min
abs
set
comprehension
int
Consise with slices
Replace First
typing.Iterable
Iterable
typing
list
Short and efficient
All Upper I
all
isupper
isalpha
bool
or
Short solution using built-in functions
Max Digit
max
int
str
Simple
Count Digits
isdigit
sum
comprehension
int
str
Trivial
Is Even
bool
int
Simple
Acceptable Password I
bool
str
len
Simple solution
Acceptable Password I
bool
str
len
Solution with regex
Sum Numbers
re.compile
compile
findall
re.findall
r-string
2
Simple and efficient
First Word (simplified)
find
inline-if
str
While loop
End Zeros
break
while
int
if
Consise with slices
Between Markers (simplified)
rfind
find
str
2
Trivial
Number Length
int
str
len
Simple solution
All the Same
Any
typing.Any
all
List
typing.List
1
Simple
Remove All Before
ValueError
typing.Iterable
Iterable
except
try
First
Easy Unpack
Short and simple
Backward String
join
str
Short and simple
Correct Sentence
upper
inline-if
str
Trivial
Multiply (Intro)
Home
First
Pawn Brotherhood
ord
map
set
lambda
int
1
Simple solution
Second Index
find
None
inline-if
int
str
3
Find and slice
Between Markers
rfind
find
inline-if
str
len
Count and sort
Sort Array by Element Frequency
get
sort
enumerate
append
list-comp
Short and efficient
Backward Each Word
reversed
join
split
comprehension
str
1
Simple slices
Split List
list
len
Simple solution
Date and Time Converter
re.split
f-string
r-string
map
re
1
First
Non-unique Elements
if-comprehension
in
list-comp
comprehension
else
Simple
Morse Decoder
capitalize
join
split
comprehension
First
Right to Left
map
replace
lambda
join
Simple and readable
Sun Angle
round
map
inline-if
split
int
First
Days Between
date
datetime.date
datetime
abs
Sort and slice
Bigger Price
lambda
sorted
True
list
int
Regex
First Word
re.search
search
re
str
Simple and efficient
Popular Words
re.split
dict-comp
r-string
dict
re
First
Three Words
isalpha
False
True
split
else
First
Even the Last
enumerate
inline-if
sum
if-comprehension
comprehension
1
Electronic Station
No redundant or unnecessary checks
Find Sequence
or
while
False
True
range
7
2
Readable and efficient with queue of dictionaries
Cipher Dict
collections.deque
deque
f-string
collections
inline-if
7
Dict-based fast solution
Surjection Strings
zip
bool
or
False
True
First
Verify Anagrams
filter
isalpha
lower
lambda
sorted
First
Boolean Algebra
lambda
Regular expression
Unix Match. Part 1
fullmatch
re.fullmatch
re
None
replace
Simple
Acceptable Password IV
any
isdigit
bool
or
sum
Simple solution
Acceptable Password IV
isdigit
bool
or
sum
and
Simple
Acceptable Password VI
isdigit
bool
set
lower
or
First
Digits Multiplication
mul
operator.mul
operator
functools.reduce
reduce
Simple
Acceptable Password III
any
isdigit
bool
sum
and
Simple solution
Acceptable Password III
isdigit
bool
sum
and
comprehension
Simple
Acceptable Password II
any
isdigit
bool
and
comprehension
Simple solution
Acceptable Password II
any
isdigit
bool
and
comprehension
Simple and efficient
Ascending List
all
typing.Iterable
Iterable
bool
typing
First
Brackets
pop
or
in
elif
False
Scientific Expedition
Regex and try ... except
YAML. Simple Dict
Exception
re.split
strip
re
except
5
First
The Hidden Word
find
zip
map
enumerate
replace
1
First
Pangram
set
lower
sorted
join
in
Simple
Letter Queue
pop
join
append
split
else
1
Simple one-liner
Conversion into CamelCase
capitalize
join
split
comprehension
First
The Most Wanted Letter
filter
isalpha
lower
lambda
sorted
One-liner with regex and join
Conversion from CamelCase
findall
re.findall
re
lower
join
First
Secret Message
join
if-comprehension
and
comprehension
3
Dict and tuple unpacking
Follow Instructions
for
First
Common Words
set
sorted
join
split
First
Striped Words
issubset
re.split
filter
upper
re
Deque efficient solution
Letter Queue
collections.deque
deque
collections
join
append
First
I Love Python!
First
Absolute Sorting
abs
sorted
Simple
Bird Language
isalpha
set
join
while
in
Second
Secret Message
filter
isupper
join
str
O'Reilly
Short and efficient
Sort Except Zero
pop
typing.Iterable
Iterable
typing
inline-if
12
1
First
Xs and Os Referee
lambda
and
if
15
Readable
Multiple Lightbulbs
typing.Union
Union
Optional
typing.Optional
datetime.timedelta
19
Using yield / yield from
Flatten a List (generator version)
type
yield
is
else
int
Using yield / yield from
Flatten a List (iterator version)
type
yield
is
else
int
Simple and recursive
How Deep
isinstance
tuple
max
not
inline-if
1
Readable
Lightbulb End Watching
Optional
typing.Optional
datetime.timedelta
timedelta
is
First
Count Inversions
enumerate
sum
comprehension
Readable
Lightbulb Start Watching
Optional
typing.Optional
datetime.timedelta
timedelta
is
Consise with slices
Replace Last
list
1
Straightforward with built-in timedelta
Lightbulb Intro
datetime.timedelta
timedelta
is
datetime.datetime
datetime
Simple slices
Chunk
min
typing.Iterable
Iterable
typing
list-comp
Readable and efficient
Reverse Every Ascending
append
range
len
for
if
Simple solution
Majority
bool
sum
list
len
1
Short and efficient
Frequency Sorting
get
lambda
sorted
for
Readable
Time Converter (12h to 24h)
f-string
map
elif
and
split
Ugly
Flatten a List
isinstance
append
list
else
for
Simple solution
Remove All After
enumerate
typing.Iterable
Iterable
typing
list
First
Median
sort
inline-if
len
1
First
Index Power
inline-if
len
Incinerator
First
Friends
class
frozenset
add
remove
map
Simple and Readable
The Vampires
class
collections.deque
deque
property
super
Simple and Readable
The Defenders
class
collections.deque
deque
math.ceil
ceil
Simple and commented
Army Battles
class
collections.deque
deque
math.ceil
ceil
Simple and commented
The Warriors
class
math.ceil
ceil
property
super
First
Building Base
class
map
join
str
Mine
Recursive with backtracking
Determinant
enumerate
False
True
else
len
4
Recursive optimizted brute-force solution
Color Map
add
set
False
True
list-comp
8
3
First
Moore Neighbourhood
min
max
sum
range
comprehension
13
Clean one-pass chemical parser
Chemical Analysis
class
staticmethod
Exception
raise
decorator
Simple
Cut Sentence
and
range
len
for
if
Detailed
Achilles and the Tortoise
Iterative and recursive
The Greatest Common Divisor
inline-if
range
len
for
First
Binary Count
bin
count
First
Fizz Buzz
else
str
if
Ice Base
Single pass Solution
Long Repeat
None
else
for
if
8
One pass solution
Largest Rectangle in a Histogram
max
elif
append
for
if
10
With symmetry optimization
Counting Tiles
math.ceil
ceil
math
break
while
One--pass solution
Reverse Roman Numerals
for
if
Dynamic Programming solution
Making Change
min
None
or
and
range
First
Roman Numerals
lambda
join
comprehension
First
Feed Pigeons
while
True
if
Simple and efficient with join and conditional expression
Morse Encoder
lower
inline-if
join
comprehension
1
First
How to Find Friends
add
pop
set
not
while
First
Monkey Typing
find
lower
sum
if-comprehension
comprehension
First
The Most Numbers
min
max
inline-if
len
Alice In Wonderland
Single pass solution with dictionary
Long Non Repeat
enumerate
in
and
for
if
2
Formula with explanation
Multiplication Table
bin
count
len
3
2
Numpy + Counter
The Fastest Horse
argmin
numpy.argmin
numpy.array
array
numpy
8
Documented
Digits Doublets
reverse
collections.deque
deque
is
dict-comp
17
Simple and Readable
Zigzag Array
List
typing.List
typing
append
range
Simple and Readable
Middle Characters
inline-if
len
if
First
Transposed Matrix
list-comp
range
comprehension
len
GitHub
One pass efficient solution
Simplify Unix Path
startswith
pop
not
or
inline-if
1
Readable single pass solution
Create Intervals
sort
append
range
list
len
7
Optimized readable brute-force
Long Repeat Inside
all
break
max
elif
range
11
1
Simple, efficent and documented
Merge Intervals (generator version)
yield
max
else
for
if
20
One pass efficient solution
Create Intervals (generator version)
yield
is
None
sorted
elif
Regex and f-string
Cookies
f-string
re.search
search
re
BFS iterative solution using deque
Power Supply
collections.deque
deque
update
keys
add
Simple shortest path with BFS
Open Labyrinth
reverse
insert
items
pop
not
Simple shortest path with BFS with deque
Open Labyrinth
collections.deque
deque
items
collections
pop
Simple, efficient and readable
Merge Intervals
max
not
append
else
for
1
Clear
The Most Frequent Weekdays
date
datetime.date
datetime
inline-if
First
Solution for Anything
class
object
True
Object Oriented and efficient
Painting Wall
class
union
property
decorator
enumerate
Simple and optimized
The Highest Building
enumerate
None
len
for
if
First
The End of Other
endswith
enumerate
or
False
True
Dropbox
First
Speech Module
map
lambda
inline-if
join
str
5
Short, readable and efficient
Worth of Words
max
lower
sum
comprehension
17
1
Second
Speech Module
lambda
inline-if
join
20
Fast factoring
Numbers Factory
collections.deque
deque
collections
inline-if
while
Simple solution
Friendly Number
f-string
abs
inline-if
while
and
1
First
Three Points Circle
math.sqrt
sqrt
format
math
pop
First
The Best Number Ever
cmath.exp
cmath.pi
cmath
exp
pi
Simple with function map
Simple Hashlib
hashlib.sha1
hashlib.sha224
hashlib.sha256
hashlib.sha384
hashlib.sha512
No redundant computations
Humpty Dumpty Form
math.atanh
atanh
math.asin
asin
math.pi
Optimized
The Longest Palindromic
break
max
or
while
True
PyCon TW
One pass
Sum Consecutives
None
append
for
if
6
Iterative DFS
Calculate Islands
filter
enumerate
pop
bool
sorted
16
Functional Style
Golden Pyramid
functools.reduce
reduce
functools
enumerate
max
Gaus custom solver
How Much Gold
items
while
and
split
range
1
Table with grades in descendig order
Ryerson Letter Grade
None
int
str
for
if
Simple
Simple Areas
raise
math.pi
pi
math.sqrt
sqrt
First
Golden Pyramid
max
append
range
len
for
Optimized and readable
Double Substring
min
break
max
range
len
Bubble sort with preemptive break
Robot Sort
f-string
break
join
False
append
First
Digit Stack
pop
elif
append
split
else
First
House Password
elif
False
and
True
else
1
Storage
Simple linear solution
Saw the Stick
enumerate
while
append
True
for
4
With cached set and scores
Moria Doors
KeyError
punctuation
string.punctuation
dict-comp
pass
7
1
Linear solution
Saw the Stick
enumerate
inline-if
while
and
append
14
1
Regex and geometry
Earth Distances
math.radians
radians
math.cos
cos
math.sin
Compact
Skew-symmetric Matrix
all
range
comprehension
len
Compact
Weak Point
zip
enumerate
min
sum
comprehension
O(n^2 log(n)) solution
The Rows of Cakes
float
inline-if
sum
sorted
and
HubSpot
Solution with datetime.date
Next Birthday
Dict
typing.Dict
Tuple
typing.Tuple
as
Readable and efficient
New Cities
keys
add
pop
set
while
Efficient, readable and commented
Repeating Decimals
divmod
f-string
get
map
inline-if
Simple solution with two queues
Auto Painting
collections.deque
deque
collections
min
break
Short and simple
Non Empty Lines
strip
bool
sum
split
comprehension
Iterative DFS
Node Disconnected Users
keys
add
pop
set
sum
First
Number Base
ValueError
except
try
int
1
First
The Hamming Distance
format
abs
sum
range
comprehension
Recursive
Restricted Sum
pop
inline-if
Blizzard
Space efficient
String Conversion
min
inline-if
range
list
len
7
Generic
Min and Max
getattr
hasattr
is
get
None
13
Prim's algorithm with priority queue
Connect Stars
heappush
heapq.heappush
heappop
heapq.heappop
heapq
Iterative DFS
Radiation Search
enumerate
pop
max
while
append
Readable and efficient
Stressful Subject
endswith
all
any
isupper
isalpha
Simple
The Angles of a Triangle
math.degrees
degrees
math.acos
acos
math
Rock
Functional Style
Parity Bit Generator
filter
chr
format
map
lambda
9
Optimized readable brute-force
Most Efficient Cutting
enumerate
min
sum
append
comprehension
Fixed-point with average
Super Root
not
while
Gridless solution
Life Counter
update
set-comp
yield
enumerate
set
One-pass efficient solution
Sort by Removing
not
append
range
list
len
Shelter
Short and simple
The Nearest Square Number
math.floor
floor
math.ceil
ceil
math.sqrt
Simple and Readable
Pattern Recognition
all
replace
range
comprehension
len
Scary
Ghosts Age
while
else
if
Codeship
Recursive
Pearls in the Box
count
inline-if
len
if
11
BFS with deque
The 88th Puzzle
collections.deque
deque
all
collections
zip
BFS with deque (2)
The 88th Puzzle
collections.deque
deque
collections
enumerate
pop
Hermit
Readable
Colder-Warmer
filter
sort
lambda
or
and
Recursive parser with associated grammar
Simplification
items
enumerate
break
isdigit
not
Fractions and f-strings
Fractions Addition
Fraction
fractions.Fraction
fractions
divmod
f-string
Watchtower
Clear and simple
Ethernet Ring Dimensioning
math.ceil
ceil
dict-comp
math
enumerate
9
Optimized Brute-Force Search
Magic Square
update
any
remove
map
continue
Addition without + - / *
Funny Addition
or
while
1
Readable solution
Compare Functions
is
None
except
try
inline-if
Readable solution 2
Compare Functions
pass
None
except
try
inline-if
Clear, readable
Vigenere Cipher
chr
ord
zip
enumerate
break
Simple with inner function
Rotate Hole
all
if-comprehension
list-comp
range
comprehension
Escher
Simple and efficient
Ground for the House
float
enumerate
min
max
inline-if
Simple
The Stone Wall
strip
float
zip
enumerate
count
3
Simple and efficient
Compass, Map and Spyglass
enumerate
abs
max
for
if
Simple
The Ship Teams
items
sort
append
else
for
Not On Map
Simple and fast with array of frequencies
Most Wanted Letter
chr
ord
isalpha
max
lower