title: How should I remove all the repeated words and letters of a String?
body: <p>I am trying to remove every character repeated over 2 times from an extremely long string. So, for example, the word <code>Terrrrrrific</code> becomes <code>Terrific</code>.</p>
  
  <p>Now my question is, how do I filter out repeats that include more than a single character the same way, i.e. if I have <code>Words words words words words</code> I want to filter it down to <code>words words</code>, however, it might be something less sensible, such as <code>abcdabcdabcdabcdabcd</code> which should become <code>abcdabcd</code>.</p>
  
  <p>I do suspect that I should use a suffix tree, but I'm not sure how to go at the algorithm exactly.</p>