private void buildHeap( Collection<? extends E> c ) {
    // move the elements of c into a complete binary tree
    //  rooted at top
    heap = ( E[] ) c.toArray();
    size = c.size();
    // let cursor be the rightmost interior node
    int cursor = ( size / 2 ) - 1;

    // invariant: the children of cursor are valid heaps
    // while there are heaps to fix
    while ( cursor >= TOP ) {
      fixHeap( cursor ); // fix the heap rooted at cursor
      cursor--; // move cursor to the next
      // rightmost unvisited interior
      // node
    }
  }