code: void balance(
      DeleteStack   stack,
      int           ntop)
    {
      DeleteStack.HeightNote xx = stack.heightNote();
      ntop--;
      GBSNode bnext = stack.node(ntop + 1);/* Set initial "next" point        */
      for (int i = ntop; i > 0; i--) /* Work UP through the balance points    */
      {
        xx.depthDecrease = false;
        reBalance(xx, stack.node(i-1), stack.node(i), bnext);
        bnext = xx.bnew;
        if ( !xx.depthDecrease )     /* Depth did not change                  */
          break;                     /* So we are re-balanced                 */
      }
    }
docs: Restore height balance following a fringe raveling caused by a delete.
  
  @param stack The DeleteStack through which the delete path traversed.
  @param ntop  The index within the DeleteStack of the parent of the
  t0 fringe that was raveled.