Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 463 Bytes

live-test.md

File metadata and controls

10 lines (7 loc) · 463 Bytes

The input is a list of names in random order. We need a function that chains elements of the list in such a way that the last character of an name is the same as the first one of the next name.

For instance:

  • Input: [“Raymond”, “Nora”, “Daniel”, “Louie”, “Peter”, “Esteban”]
  • Output: [“Peter”, “Raymond”, “Daniel”, “Louie”, “Esteban”, “Nora”]

There should be only one solution, so the first element is unique.