     "metadata": {},
     "source": [
      "## Algorithm\n",
      "\n",
      "### add_node\n",
      "\n",
      "* Create a node with the input id\n",
      "* Add the newly created node to the list of nodes\n",
      "\n",
      "Complexity:\n",
 
</s> remove     "### add_edge\n",
 </s> add     "#### add_edge\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.connections = {}\n",
 </s> add     "        self.connections = {}  # key = node, val = weight\n", </s> remove     "        self.nodes = {}\n",
 </s> add     "        self.nodes = {}  # key = node id, val = node\n",
    "### 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",
     "metadata": {},
     "source": [
      "## Algorithm\n",
      "\n",
    "### 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",
      "\n",
      "* Create a node with the input id\n",
      "* Add the newly created node to the list of nodes\n",
      "\n",
      "Complexity:\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