title: Total number of possible triangles from n numbers
body: <p>If <code>n</code> numbers are given, how would I find the total number of possible triangles? Is there any method that does this in less than <code>O(n^3)</code> time?</p>
  
  <p>I am considering <code>a+b&gt;c</code>, <code>b+c&gt;a</code> and <code>a+c&gt;b</code> conditions for being a triangle.</p>