mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-07 18:08:01 +00:00
Tweaked remove duplicates challenge algorithm discussion.
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
"\n",
|
||||
"* Is this a singly or doubly linked list?\n",
|
||||
" * Singly\n",
|
||||
"* Can you insert NULL values in the list?\n",
|
||||
"* Can you insert None values in the list?\n",
|
||||
" * No\n",
|
||||
"* Can you use additional data structures?\n",
|
||||
" * Implement both solutions\n",
|
||||
@@ -72,7 +72,7 @@
|
||||
"\n",
|
||||
"Complexity:\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",
|
||||
"Note:\n",
|
||||
"* Deletion requires two pointers, one to the previous node and one to the current node"
|
||||
@@ -93,7 +93,7 @@
|
||||
"\n",
|
||||
"Complexity:\n",
|
||||
"* Time: O(n^2)\n",
|
||||
"* Space: In-place\n",
|
||||
"* Space: O(1)\n",
|
||||
"\n",
|
||||
"Note:\n",
|
||||
"* Deletion requires two pointers, one to the previous node and one to the current node\n",
|
||||
|
||||
Reference in New Issue
Block a user