the Time complexity for reversing a linked list is O(n)

This commit is contained in:
Justin LeFebvre 2015-07-11 21:07:17 -04:00
parent 27c4a4f97c
commit 488ae5d091

View File

@ -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",