mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
the Time complexity for reversing a linked list is O(n)
This commit is contained in:
parent
27c4a4f97c
commit
488ae5d091
|
@ -66,7 +66,7 @@
|
||||||
" * Only need to compare the first half\n",
|
" * Only need to compare the first half\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Complexity:\n",
|
"Complexity:\n",
|
||||||
"* Time: O(1)\n",
|
"* Time: O(n)\n",
|
||||||
"* Space: O(n)\n",
|
"* Space: O(n)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"Note:\n",
|
"Note:\n",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user