title: Build Heap function
body: <p>In my university notes the pseudocode of Build Heap is written almost like this (Only difference were parenthesis I have brackets):</p>
  
  <p><img src="https://i.stack.imgur.com/15Z7Z.jpg" alt="enter image description here"></p>
  
  <p>And I searched on the internet and there are several like this:</p>
  
  <p>But shouldn't be something like that?</p>
  
  <pre><code>BuildHeap(A) {
     heapsize &lt;- length[A]
     for i &lt;- floor(length[A]/2) downto 1
        Heapify(A,i)
  }
  </code></pre>
  
  <p>Why they writing heap_size[A] = length[A]?</p>