Justified Text

Given a long string of text, you will have to print it following these rules: Replace all consecuti…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

What is wrong with my .go solution whether .cpp solution got Accepted?

Why I’m getting the wrong answer for the last test case?
Here is my code https://toph.co/s/663598