mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-08 10:28:03 +00:00
Tweaked unique chars challenge algorithm discussion.
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
" \n",
|
" \n",
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"* Time: O(n)\n",
|
"* Time: O(n)\n",
|
||||||
"* Space: Additional O(m), where m is the number of unique characters in the set"
|
"* Space: Additional O(n)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"* Time: O(n)\n",
|
"* Time: O(n)\n",
|
||||||
"* Space: Additional O(m), where m is the number of unique characters in the hash map"
|
"* Space: Additional O(n)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"Algorithm Complexity:\n",
|
"Algorithm Complexity:\n",
|
||||||
"* Time: O(n^2)\n",
|
"* Time: O(n^2)\n",
|
||||||
"* Space: In-place"
|
"* Space: O(1)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user