Challenge: List Sort Using Tries
This lesson is about sorting string lists using tries.
We'll cover the following
Problem Statement #
In this problem, you have to implement the sortArray() function, which will sort the elements of an array of strings.
Input #
An array of strings.
Output #
Returns the input array in the form of a sorted vector.
Sample Input #
keys = {"the", "a", "there", "answer", "any","by", "bye", "their","abc"}
Sample Output #
{'a', 'abc','answer','any','by','bye','the','their','there'}
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.