Question: Please help me write this code in Java 8 . Please make sure that the code meets all the needed requirements mentioned in the question

Please help me write this code in Java 8. Please make sure that the code meets all the needed requirements mentioned in the question under each part such as under INPUT FORMAT, OUTPUT FORMAT, AND CONSTRAINTS. Can you also make sure to comment the code? Please include screenshots of your input and output, which should match the ones in the question. Thank You!

For the question below this is the hint we recieved: The idea is to create a graph of characters and then find topological sorting of the created graph.

Please help me write this code in Java 8. Please make sure

This is the sample input and the sample output. Your code should give the exact same output as below after entering the sample inputs given.

that the code meets all the needed requirements mentioned in the question

You will receive a "sorted" array of words, representing an alphabetized dictionary in an alien language. Sorted" is in quotations because this array will not appear sorted to the untrained eye - that's because in this alien language, the letter order is different than from English. Your job is to determine the order of characters in the alien language, or to determine that we don't have enough information to make that determination. For example, given {"Caa", "aaa", "aab"} we can determine the alien alphabet must be ordered Input Format The first line of input will indicate the number of words n in the alien dictionary. The next n lines will be the words, alphabetized: 3 caa aab Constraints You can assume the alien alphabet consists of 26 or fewer letters, each of which is also in the English alphabet. Output Format A single line with the space-separated alien alphabet in order (no terminating white space). For example, for the above input

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!