Update graph challenge (#117)

Use more specific exception types. Update constraints. Update add_undirected_edge to use add_edge.
This commit is contained in:
Donne Martin
2016-11-13 07:32:33 -05:00
committed by GitHub
parent 3d4ae5c22f
commit 2d98b8a496
3 changed files with 31 additions and 23 deletions

View File

@@ -38,12 +38,14 @@
" * Implement both\n",
"* Do the edges have weights?\n",
" * Yes\n",
"* Can we assume the inputs are valid?\n",
"* Can the graph have cycles?\n",
" * Yes\n",
"* If we try to add a node that already exists, do we just do nothing?\n",
" * Yes\n",
"* If we try to delete a node that doesn't exist, do we just do nothing?\n",
" * Yes\n",
"* Can we assume the inputs are valid?\n",
" * Yes\n",
"* Can we assume this fits memory?\n",
" * Yes"
]