First, write an algorithm that takes in an array of strings, sorts each string, and then sorts the full array. Second, calculate the time complexity (Big O) of this algorithm.
To sort each individual string in the array, we would start by looping through the whole array, sorting each string element, and either replacing the strings in the original array with their sorted versions, or building a new array with the sorted strings.
Then, to sort the whole array, we would perform some sorting function on it.