Skip to main content
deleted 22 characters in body
Source Link
you786
  • 111
  • 3
  1. Maintain an inner hash table to look up name duplicates. O(1)

a. Name of city hashes to int that stores current distancechar *name => long shortestRoute

  1. Don't instantiate (new *node) until absolutely necessary.

Should be all that is needed.

  1. Maintain an inner hash table to look up name duplicates. O(1)

a. Name of city hashes to int that stores current distance

  1. Don't instantiate (new *node) until absolutely necessary.

Should be all that is needed.

  1. Maintain an inner hash table to look up name duplicates. O(1)

a. char *name => long shortestRoute

  1. Don't instantiate (new *node) until absolutely necessary.

Should be all that is needed.

Source Link
you786
  • 111
  • 3

  1. Maintain an inner hash table to look up name duplicates. O(1)

a. Name of city hashes to int that stores current distance

  1. Don't instantiate (new *node) until absolutely necessary.

Should be all that is needed.