pythonic algorithms

Go Back home

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
plotting performance
string contains all chars
using xor for signedness
find missing number in array
int to base
[[implement log2]]
gcd

Advanced Python

python array module

Greedy Method

optimal merge pattern
huffman encoding
job scheduling with deadlines

Trees

minimum cost spanning tree
multistage graph