標籤:資料結構 順序棧和鏈棧 java實現棧 線性表之棧 棧的定義:(特殊的線性表)??僅在表的一端進行插入和刪除的線性表。允許插入、刪除的這一端稱為棧頂,另一端稱為棧底。表中沒有元素時稱為空白棧。??被稱為後進先出的線性表(Last In First Out),簡稱 LIFO表,或被稱為先進後出的線性表(First In Last Out),簡稱 FILO表。
標籤:leetcode java minimum depth of bin 題目: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.
標籤:數組 求和 java 面試 演算法 【015-3 Sum(三個數的和)】【LeetCode-面試演算法經典-Java實現】【所有題目目錄索引】原題 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0
標籤:數組 求和 java 面試 演算法 【016-3 Sum Closest(最接近的三個數的和)】【LeetCode-面試演算法經典-Java實現】【所有題目目錄索引】原題 Given an array S of n integers, find three integers in S such that the sum
標籤:字串 數字 java 演算法 面試 【017-Letter Combinations of a Phone Number (電話號碼上的單片語合)】【LeetCode-面試演算法經典-Java實現】【所有題目目錄索引】原題 Given a digit string, return all possible letter
標籤:1:java泛型的好處是可以實作類別型檢查,比較安全,可以實現功能的擴充化,增強功能。2:泛型的概念就是參數化類別型,相當於方法中的形式參數一樣,先做一個預留位置然後再在使用的時候傳遞真正的參數進去。3:package generic;/** * 自訂泛型類 * @author PC * */public class GenericModel <T>{ private T data; public GenericModel(){ }