From 488ae5d091c8a63a26fbe99805d8709d43ba013d Mon Sep 17 00:00:00 2001 From: Justin LeFebvre Date: Sat, 11 Jul 2015 21:07:17 -0400 Subject: [PATCH] the Time complexity for reversing a linked list is O(n) --- linked_lists/palindrome/palindrome_solution.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linked_lists/palindrome/palindrome_solution.ipynb b/linked_lists/palindrome/palindrome_solution.ipynb index 199809b..a1d79ec 100644 --- a/linked_lists/palindrome/palindrome_solution.ipynb +++ b/linked_lists/palindrome/palindrome_solution.ipynb @@ -66,7 +66,7 @@ " * Only need to compare the first half\n", "\n", "Complexity:\n", - "* Time: O(1)\n", + "* Time: O(n)\n", "* Space: O(n)\n", "\n", "Note:\n",