diff --git a/sorting_searching/insertion_sort/insertion_sort_challenge.ipynb b/sorting_searching/insertion_sort/insertion_sort_challenge.ipynb index 43ffbd0..8914108 100644 --- a/sorting_searching/insertion_sort/insertion_sort_challenge.ipynb +++ b/sorting_searching/insertion_sort/insertion_sort_challenge.ipynb @@ -34,7 +34,7 @@ "source": [ "## Constraints\n", "\n", - "* Is a naiive solution sufficient?\n", + "* Is a naive solution sufficient?\n", " * Yes\n", "* Are duplicates allowed?\n", " * Yes\n", diff --git a/sorting_searching/insertion_sort/insertion_sort_solution.ipynb b/sorting_searching/insertion_sort/insertion_sort_solution.ipynb index 16af925..98f2c6b 100644 --- a/sorting_searching/insertion_sort/insertion_sort_solution.ipynb +++ b/sorting_searching/insertion_sort/insertion_sort_solution.ipynb @@ -33,7 +33,7 @@ "source": [ "## Constraints\n", "\n", - "* Is a naiive solution sufficient?\n", + "* Is a naive solution sufficient?\n", " * Yes\n", "* Are duplicates allowed?\n", " * Yes\n", @@ -72,8 +72,15 @@ " * Break\n", "\n", "Complexity:\n", - "* Time: O(n^2) avarage, worst. O(1) best if input is already sorted.\n", - "* Space: O(1), stable" + "* Time: O(n^2) avarage, worst. O(1) best if input is already sorted\n", + "* Space: O(1) for the iterative solution\n", + "\n", + "Misc: \n", + "\n", + "* In-place\n", + "* Stable\n", + "\n", + "Insertion sort works well for very small datasets where most of the input is already sorted." ] }, {