Displaying posts tagged: algorithms

Detecting Cycles in Tree Structures with PHP

No Comments
My Gallery recently had some serious database issues. I had to write some code outside of the Gallery proper to look for database errors. When I went to look for cycles in the tree, I didn't find any handy algorithms out in the wild of the internet, so I wrote something. That produces this output: Found ...