private void heapifyUp(int twopos,Comparable<Object> cur){
  while (twopos > 0) {
    final int parent=(twopos - 1) >>> 1;
    Comparable<Object> par=twoheap[parent];
    if (cur.compareTo(par) <= 0) {
      break;
    }
    twoheap[twopos]=par;
    twopos=parent;
  }
  twoheap[twopos]=cur;
}

private void heapifyUp ( int twopos , Comparable < Object > cur ) { while ( twopos > 0 ) { final int parent = ( twopos - 1 ) > > > 1 ; Comparable < Object > par = twoheap [ parent ] ; if ( cur . compareTo ( par ) <= 0 ) { break ; } twoheap [ twopos ] = par ; twopos = parent ; } twoheap [ twopos ] = cur ; }
heapify - up method for 2 - ary heap .
