Challenge: List Sort Using Trie

This lesson is about sorting string lists using tries.

Problem Statement #

In this problem, you have to implement the sort_list() function which will sort the elements of a list of strings.

Input #

A list of strings.

Output #

Returns the input list in a sorted state.

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.