How can you arrange the words of an input text lexicographically? We can do it using Brute Force method.But is there any other better way? Yes, there are. One such way is by using Trie or Prefix Tree Data Structure. This document shows how to do it using practical code.