pythonic algorithms

🏠

nested functions
lambdas
list comprehensions
generator expressions
reduce
switch calculator
splitting a list into two distinct sublists
ternary conditionals
string formatting
enumerate
reversing a subarray
binary search
string substrings
shifted zip
return a list with 0 or 1 items
slicing to prevent list index out of range
array max
array min
max array
max array from right
matrix transpose
matrix clockwise rotation
matrix anticlockwise rotation
itertools.product
list index complement
single bidirectional pass
string contains all chars unordered
string contains all chars ordered
using xor for signedness
find missing number in array
int to base
gcd
dfs
bfs
dp array sum

Advanced Python

python array module

Greedy Method

optimal merge pattern
huffman encoding
job scheduling with deadlines

Trees

minimum cost spanning tree
multistage graph