Q: Given a list of words like https://github.com/NodePrime/quiz/blob/master/word.list find the longest compound-word in the list, which is also a concatenation of other sub-words that exist in the list. The program should allow the user to input different data. The finished solution shouldn't take more than one hour. Any programming language can be used, but Go is preferred.
Fork this repo, add your solution and documentation on how to compile and run your solution, and then issue a Pull Request.
Obviously, we are looking for a fresh solution, not based on others' code.
This program is not dependent on third-party libraries. Just use the following commands to compile and run:
# g++ main.cc -o quiz
# ./quiz word.list
Run the program without arguments to show a brief help about extra options.
This program was compiled with GNU G++ 4.8.4 and tested on GNU/Linux Ubuntu 14.04 x86_64. You probably could compile and run on Windows or other GNU/Linux distributions.