title: Number of substrings in a string: n-squared or exponential
body: <p>How many subtrings are there in a string in general?</p>
  <pre><code>Why does string x [1:n] have O(n^2) subtrings according to the lecture 21 Dynamic Programming III of        
  6.006 from MIT? 
  Why it is not O(2^n)?
  </code></pre>
  <p>Here is a link [http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-videos/MIT6_006F11_lec21.pdf]</p>