標籤:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.解題思路:注意minimum depth最後遍曆的那個點,left right都必須為null,JAVA實現如下: public int
標籤:Given a binary tree, return the bottom-up level order traversal of its nodes‘ values. (ie, from left to right, level by level from leaf to root). For example:Given binary tree {3,9,20,#,#,15,7}, 3 / 9 20 / 15 7 return its
標籤:Given a binary tree, return the level order traversal of its nodes‘ values. (ie, from left to right, level by level). For example:Given binary tree {3,9,20,#,#,15,7}, 3 / 9 20 / 15 7 return its level order traversal as:[ [3], [9
標籤:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / 2 2 / \ / 3 4 4 3 But the following is not: 1 / 2 2 \ 3
標籤: Java多線程(五)、多線程其他知識簡要介紹 分類: javaSE綜合知識點 2012-09-19 18:12 1413人閱讀 評論(1) 收藏 舉報 一、線程組[java] view plaincopyprint?/** * A thread group represents a set of threads. In&
標籤:所有的Java開發人員可能會遇到這樣的困惑?我該為堆記憶體設定多大空間呢?OutOfMemoryError的異常到底涉及到運行時資料的哪塊地區?該怎麼解決呢?Java記憶體模型Java記憶體模型在JVM specification, Java SE 7 Edition, and mainly in the chapters “2.5 Runtime Data Areas” and “2.6
標籤:Given a collection of integers that might contain duplicates, nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For example,If nums = [1,2,2], a