Problem https://leetcode.com/problems/maximum-depth-of-binary-tree/Given a binary tree,...
Problem https://leetcode.com/problems/maximum-depth-of-binary-tree/Given a binary tree,...
Problem https://leetcode.com/problems/symmetric-tree/ Given a binary tree, check whethe...
Problem https://leetcode.com/problems/same-tree/ Given two binary trees, write a functi...
Tree Summary Definition for a binary tree node. Binary Tree Traversal: Pre-order/ In-or...
Problem https://leetcode.com/problems/binary-tree-inorder-traversal/Given a binary tree...
泛型是JDK1.5之后增加。泛型的本质:数据类型的参数化。我们可以把泛型理解为数据类型的一个占位符(形式参数),即告诉编译器,在调用泛型时必须传入实际类型。 没有使用泛型时:...
在JDK1.5已经提供了Future和Callable的实现,可以用于阻塞式获取结果,如果想要异步获取结果,通常都会以轮询的方式去获取结果,如下: 从上面的形式看来轮询的方式...
Problem:### Implement strStr().Returns the index of the first occurrence of needle in h...
Problem:### Given a string containing just the characters '(', ')', '{', '}', '['and ']...
1.static关键字的作用? 1)第一个作用:隐藏。当我们同时编译多个文件时,所有未加static前缀的全局变量和函数都具有全局可见性。 2)static的第二个作用是保持...
Problem:### Write a function to find the longest common prefix string amongst an array ...
Problem:### Given a roman numeral, convert it to an integer.Input is guaranteed to be w...
Problem:### The string "PAYPALISHIRING" is written in a zigzag pattern on a given numbe...
Definition: a hash table (hash map) is a data structure used to implement an associativ...