int CalcWPL(BiTree T,int d){
static int wpl;
if(!(T->lchild)&&!(T->rchild)){
wpl+=(T->weight)*d;
}
if(T->lchild)CalcWPL(T->lchild,d+1);
if(T->rchild)CalcWPL(T->rchild,d+1);
return wpl;
}//調用時傳入0給d
int CalcWPL(BiTree T,int d){
static int wpl;
if(!(T->lchild)&&!(T->rchild)){
wpl+=(T->weight)*d;
}
if(T->lchild)CalcWPL(T->lchild,d+1);
if(T->rchild)CalcWPL(T->rchild,d+1);
return wpl;
}//調用時傳入0給d
kubectl config get-contexts kubectl config use-context <context-name> kubectl config current-context