Depth-first vs breadth-first cleaning

I was doing some chores and tidying around the house today when I had a funny thought. Forgive a brief detour while I provide some context. When I was in school long ago, I took a data structures course where I learned about tree traversal. Two of the most common algorithms for traversing a tree are depth-first search (travel down the tree before visiting sibling nodes) and breadth-first search…