title: An interview question - Split text into sub-strings according to rules
body: <p>Split text into sub-strings according to below rules:</p>
  
  <ul>
  <li>a) The length of each sub-string should less than or equal to M </li>
  <li>b) The length of sub-string should less than or equal to N (N &lt; M) if the sub-string contains any numeric char</li>
  <li>c) The total number of sub-strings should be as small as possible</li>
  </ul>
  
  <p>I have no clue how to solve this question, I guess it is related to "dynamic programming".
  Can anybody help me implement it using C# or Java?  Thanks a lot.</p>