GO Solution For UVa 10391 - Compound Words. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.

Input Standard input consists of a number of lowercase words, one per line, in alphabetical order. There will

...

You can find the full details of the problem Compound Words at UVa Online Judge

Sample Input

a
alien
born
less
lien
never
nevertheless
new
newborn
the
zebra

Sample Output

alien
newborn

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985