interesting algorithms that I wrote