樹--計算樹的深度

package com.Tree; import java.util.Stack; /* * 計算二叉樹深度方法(遞歸 和 非遞歸) */ public class Depth { //recursive depth() public int recDepth(BTNode p) { int ldepth, rdepth; if (p == null) return
相關文章
相關標籤/搜索