On the topic of maps

Written by
Link to Post

https://www.reddit.com/r/golang/comments/bybqq1/on_the_topic_of_maps/ by 

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.

submitted by /u/_kelvindecosta
[link] [comments]

Article Tags:
· ·
Article Categories:
reddit

Leave a Reply