Head to Tail ordering

Problem:A head to tail ordering of strings is the one in which the last letter of the previous word is the same as the first letter of the following word. For eg. ‘Angularcan be followed by ‘ rotation’.

The task is to write a code to accept a set of finite strings and determine if such an ordering is possible by arranging them in a head to tail sequence.

Link

 

Comments are closed.