title: How to clear a circular array queue in constant time O(1)
body: <p>I'm trying to find a way to implement an efficient <code>clear</code> to clear a circular array queue in constant time.</p>
  
  <p>I've tried <code>Array.fill()</code> and filled the array with <code>null</code> values but it still has to go through the array which means O(n).</p>