二叉查找樹代碼實現 java

2019.4.18更新 遞歸求深度 //遞歸求深度 public int getDepth(){ return getDepth(root); } public int getDepth(TreeNode node){ if(node == null){ return -1; } int leftDepth = getDepth(node.leftChild); i
相關文章
相關標籤/搜索