title: How to obtain all subsequence combinations of a String (in Java, or C++ etc)
body: <p>Let's say I've a string "12345" I should obtain all subsequence combinations of this string such as:</p>
  
  <ol>
  <li>--> 1 2 3 4 5</li>
  <li>--> 12 13 14 15 23 24 25 34 35 45</li>
  <li>--> 123 124 125 234 235 345</li>
  <li>--> 1234 1235 1245 1345 2345</li>
  <li>--> 12345</li>
  </ol>
  
  <p>Please note that I grouped them in different number of chars but not changed their order. I need a method/function does that.</p>