Suppose you are given a sorted list of words A written in anunfamiliar alphabet with k symbols. Write an algorithm that willoutput a valid ordering of the alphabet. For example, if your inputis:
Then all of the following are valid orderings of thealphabet:
You algorithm should run in time much faster than O (k! ยท |A|)(This is the running time you get if you iterate through allpossible orderings until you find one that is valid).
In summary the goal is to write an algorithm which outputs avalid ordering of the alphabet based on the valid orderings.
Example Syntax
OR
OR