In an attempt at implementing optimised travelling salesman problem using dynamic programming, I need a data structure that takes two keys and returns an integer.
The first key is a particular node in the graph. The second key is a set of nodes in the graph.
How do I implement a set like map key that is scalable for large graphs?
I have come across methods that use an array of bools with fixed size. I know I can’t use a slice as the set of nodes because it is not possible to use it as a map key.
Any help is appreciated.