title: A tool for calculating the big-O time complexity of Java code?
body: <p>I have a question regarding time complexity (big O notation) for Java software.  Is there a way to quickly calculate or test it (or any website that could calculate it for me would be welcomed).  For example I would like to check it for the following snippet of code and possibly improve as well:</p>
  
  <pre class="lang-java prettyprint-override"><code>int dcount = 24423567;
  int a = 0;
  if (dcount == 0){
      a = 1;
  }
  
  String ds = Integer.toString(dcount);
  String[] sa = ds.split("(?&lt;=.)");
  HashSet hs = new HashSet();
  Collections.addAll(hs, sa);
  a = hs.size();
  if (dcount &lt; 0)
      a--;
  
  System.out.println(a);
  </code></pre>