mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Tweaked rotation challenge algorithm discussion.
This commit is contained in:
parent
a1990f2298
commit
ea02d83d09
|
@ -64,7 +64,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"## Algorithm\n",
|
"## Algorithm\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Using the following test case:\n",
|
"Examine the following test case:\n",
|
||||||
"* s1 = 'barbazfoo'\n",
|
"* s1 = 'barbazfoo'\n",
|
||||||
"* s2 = 'foobarbaz'\n",
|
"* s2 = 'foobarbaz'\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"* Time: O(n)\n",
|
"* Time: O(n)\n",
|
||||||
"* Space: O(2n) of additional space for s3, which reduces to O(n)"
|
"* Space: O(n)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user