title: How to output the minimum number through Heapsort but not destory the structure of the heap？
body: <p>When I am doing some code in the website of hackerranker, there is a problem saying that you must use the heapsort and output the minimum number of an <code>ArrayList</code> given by the console, but you shouldn't destroy the structure of the tree or the heap.</p>
  
  <p>I think it's easy but I don't have an idea of how to solve it? So please help me.</p>