Make a word chain

  • 24
  • Locked
In the main method, read the name of a file that contains words separated by spaces from the console. In the getLine method, use StringBuilder to order all the words as follows: the last letter of a word must match the first letter of the next word (ignore case). Each word should be used once.
You can't complete this task, because you're not signed in.
Comments (5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Ian De Bie Full Stack Developer
3 September 2022, 21:49
i finally passed, you can see my solution on my github solution
Justin Smith
Level 38 , Greenfield, USA, United States
15 December 2021, 01:56
Absolute mindbender of a task. Knowing how to code isn't the difficult part, it's the more abstract problem-solving.
Jurij Thmsn
Level 29 , Flensburg, Germany
1 July 2021, 07:37
Really tough exercise. I tried different approaches ( recursion, nested loops, while loops, queue) but failed with all of them until I noticed that my code just didn't work because It didn't ignore the case of the characters. Solved it with a queue finally - i took me about 5 hours 🤯 Make sure to write a code that ignores case!
Level 27 , Spanish Town, Jamaica
20 March 2021, 19:41
whew, So this task sent me on a wild journey of teaching myself recursion and even translating a Ruby-coded solution I found when I got stuck. Perhaps not necessary because my first solution was messy but it worked for small inputs, but would take forever for a 100 word input file. if you want resources towards this problem, send me a message! :)
Level 0 , United Kingdom
9 December 2021, 16:13
Hi I was wondering If i could have the resources or view the code that you used to make the word chain game in java please?