title: Should Binary Heap be a binary tree or linked list?
body: <p>I have an assignment to implement a binary heap. However, I'm not sure whether I should implement the binary heap as a binary tree data structure or a simple double linked list.</p>
  
  <p>If I should implement as a binary tree, how should I keep track of the last element of the tree in order to insert a new element? In linked list that would be much easier.</p>
  
  <p>So, does binary heap have to be a binary tree? If yes, how to track the last element?</p>
  
  <p>Note: In my assignment there is a statement like this:
  <strong>But you will implement the binary heap not as an array, but
  as a tree.</strong></p>
  
  <p>To be more clear this is my node:</p>
  
  <pre><code>struct Word{
      char * word;
      int count;
      struct Word * parent;
      struct Word * left_child;
      struct Word * right_child;
  }
  </code></pre>