diff --git a/arrays_strings/permutation/permutation_solution.ipynb b/arrays_strings/permutation/permutation_solution.ipynb index 07cda2b..ee01dee 100644 --- a/arrays_strings/permutation/permutation_solution.ipynb +++ b/arrays_strings/permutation/permutation_solution.ipynb @@ -64,7 +64,7 @@ "source": [ "## Algorithm: Compare Sorted Strings\n", "\n", - "Anagrams contain the same strings but in different orders. This approach could be slow for large strings due to sorting.\n", + "Permutations contain the same strings but in different orders. This approach could be slow for large strings due to sorting.\n", "\n", "* Sort both strings\n", "* If both sorted strings are equal\n", @@ -74,7 +74,7 @@ "\n", "Complexity:\n", "* Time: O(n log n) from the sort, in general\n", - "* Space: Additional O(l + m) is created by the sorting algorithm, where l is the length of one string and m is the length of the other" + "* Space: O(n)" ] }, { @@ -121,7 +121,7 @@ "\n", "Complexity:\n", "* Time: O(n)\n", - "* Space: Additional O(m), where m is the number of unique characters in the hash map" + "* Space: O(n)" ] }, {