I found a graph library to model the actual structure of the nested bags. Spent more time trying to reason out the graph structure and figure out what I was doing, than I did actually getting the problem solved.
A fun exercise, to be sure, but not the fastest way to row the boat.
I went way overboard with my Rust solution.
I found a graph library to model the actual structure of the nested bags. Spent more time trying to reason out the graph structure and figure out what I was doing, than I did actually getting the problem solved.
A fun exercise, to be sure, but not the fastest way to row the boat.
As always, available on Github.