This question already has an answer here:
- City names game 15 answers
Given a list/array of names(String) sort them such that each name is followed by a name which starts with the last character of the previous name.
[ Luis Hector Selena Emmanuel Amish ]
[ Emmanuel Luis Selena Amish Hector ]