coverting arraylist to array in less than O(n) : <p>I am currently working on program and want to convert ArrayList to an array but in less than O(n) time.</p>

<pre><code>  for (int i = 0; i &lt; list.size(); i++) {




    if (list.get(i) != null) {
                                 arr[i] = list.get(i);
                             }
                     }
</code></pre>
