Tweaked remove duplicates challenge algorithm discussion.

This commit is contained in:
Donne Martin 2015-07-06 05:45:09 -04:00
parent 8403fe5032
commit 3061020cc1
2 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@
"\n", "\n",
"* Is this a singly or doubly linked list?\n", "* Is this a singly or doubly linked list?\n",
" * Singly\n", " * Singly\n",
"* Can you insert NULL values in the list?\n", "* Can you insert None values in the list?\n",
" * No\n", " * No\n",
"* Can you use additional data structures?\n", "* Can you use additional data structures?\n",
" * Implement both solutions\n", " * Implement both solutions\n",

View File

@ -38,7 +38,7 @@
"\n", "\n",
"* Is this a singly or doubly linked list?\n", "* Is this a singly or doubly linked list?\n",
" * Singly\n", " * Singly\n",
"* Can you insert NULL values in the list?\n", "* Can you insert None values in the list?\n",
" * No\n", " * No\n",
"* Can you use additional data structures?\n", "* Can you use additional data structures?\n",
" * Implement both solutions\n", " * Implement both solutions\n",
@ -72,7 +72,7 @@
"\n", "\n",
"Complexity:\n", "Complexity:\n",
"* Time: O(n)\n", "* Time: O(n)\n",
"* Space: O(m) where m is the number of values in the hash map\n", "* Space: O(n)\n",
"\n", "\n",
"Note:\n", "Note:\n",
"* Deletion requires two pointers, one to the previous node and one to the current node" "* Deletion requires two pointers, one to the previous node and one to the current node"
@ -93,7 +93,7 @@
"\n", "\n",
"Complexity:\n", "Complexity:\n",
"* Time: O(n^2)\n", "* Time: O(n^2)\n",
"* Space: In-place\n", "* Space: O(1)\n",
"\n", "\n",
"Note:\n", "Note:\n",
"* Deletion requires two pointers, one to the previous node and one to the current node\n", "* Deletion requires two pointers, one to the previous node and one to the current node\n",