diff --git a/linked_lists/kth_to_last_elem/kth_to_last_elem_solution.ipynb b/linked_lists/kth_to_last_elem/kth_to_last_elem_solution.ipynb index 059ec3e..3e65a9c 100644 --- a/linked_lists/kth_to_last_elem/kth_to_last_elem_solution.ipynb +++ b/linked_lists/kth_to_last_elem/kth_to_last_elem_solution.ipynb @@ -66,13 +66,13 @@ "## Algorithm\n", "\n", "* Setup two pointers, current and previous\n", - "* Give current a headstart, incrementing it once for k = 1, twice for k = 2, etc\n", + "* Give current a headstart, incrementing it once if k = 1, twice if k = 2, ...\n", "* Increment both pointers until current reaches the end\n", "* Return the value of previous\n", "\n", "Complexity:\n", "* Time: O(n)\n", - "* Space: In-place" + "* Space: O(1)" ] }, {