Studying algorithms by implementing them