code: public T poll() {
          T ans = this.a[1];
          this.a[1] = this.a[this.lastIndex--];
          percolateDown(1);
          return ans;
      }
docs: Remove the element on top of the heap
  
  @return the element being removed