      "Complexity:\n",
      "* Time: O(1)\n",
      "* Space: O(1)\n",
      "\n",
      "### add_edge\n",
      "\n",
      "* If the source node is not in the list of nodes, add it\n",
      "* If the dest node is not in the list of nodes, add it\n",
      "* Add a connection from the source node to the dest node with the given edge weight\n",
      "\n",
 
</s> remove     "### add_node\n",
 </s> add     "### Node\n",
    "\n",
    "Node will keep track of its:\n",
    "* id\n",
    "* visit state\n",
    "* connections\n",
    "    * key: node\n",
    "    * value: weight\n",
    "\n",
    "### Graph\n",
    "\n",
    "Graph will keep track of its:\n",
    "* Nodes\n",
    "    * key: node id\n",
    "    * value: node\n",
    "\n",
    "#### add_node\n", </s> remove     "* I plan to use a Node and Graph class.  \n",
    "    * Node will keep track of its id, visit state, and connections.  \n",
    "        * Connections will be a dictionary with the key = node id and value being the edge weight\n",
    "    * Graph will hold all of the nodes and have functions to add nodes and edges.  \n",
    "    * Is this in line with what you have in mind?\n",
    "        * Yes"
 </s> add     "* Is the graph directed?\n",
    "    * Yes\n",
    "* Do the edges have weights?\n",
    "    * Yes" </s> remove     "* I plan to use a Node and Graph class.  \n",
    "    * Node will keep track of its id, visit state, and connections.  \n",
    "        * Connections will be a dictionary with the key = node id and value being the edge weight\n",
    "    * Graph will hold all of the nodes and have functions to add nodes and edges.  \n",
    "    * Is this in line with what you have in mind?\n",
    "        * Yes"
 </s> add     "* Is the graph directed?\n",
    "    * Yes\n",
    "* Do the edges have weights?\n",
    "    * Yes" </s> remove     "        self.nodes = {}\n",
 </s> add     "        self.nodes = {}  # key = node id, val = node\n", </s> remove     "        self.connections = {}\n",
 </s> add     "        self.connections = {}  # key = node, val = weight\n",
    "#### add_edge\n",
      "Complexity:\n",
      "* Time: O(1)\n",
      "* Space: O(1)\n",
      "\n",
    "#### add_edge\n",
      "\n",
      "* If the source node is not in the list of nodes, add it\n",
      "* If the dest node is not in the list of nodes, add it\n",
      "* Add a connection from the source node to the dest node with the given edge weight\n",
      "\n",
keep keep keep keep replace keep keep keep keep keep
 Revised constraints and algorithm.  Added comment denoting key/value for each dictionary in the code section. 
graphs_trees/graph/graph_solution.ipynb