mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Tweaked remove duplicates challenge algorithm discussion.
This commit is contained in:
parent
8403fe5032
commit
3061020cc1
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue
Block a user