Algorithms implemented just for fun/learning