|
|
|
|
|
by siraben
1637 days ago
|
|
IntMaps in Haskell actually have time complexity of O(min(n,W))[0] = O(1) for this problem, for insertion and getting the minimal element where n is the number of entries in the map (which is 9 here) and W is the word size in bits. Another way to think of it is it's just a fixed-length array where the entries are lists of vertices. [0] https://hackage.haskell.org/package/containers-0.6.5.1/docs/... |
|