- 博客(6)
- 收藏
- 关注
转载 [leetcode 104]Maximum Depth of Binary Tree
Question: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. Code: 主要是边界判断 /** * De...
2016-06-24 00:08:00
116
转载 【mybatis】返回值为Map时,泛型的问题
dao层示例如下: public interface DemoDao { Map<String,String> getUserInfo(); } mybatis的xml查询语句如下: select userid as userid, username as username from user ; 假设数据库中,userid 为 intege...
2016-06-22 23:22:00
1456
转载 [leetcode 258]Add Digits
Question: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has...
2016-06-17 00:06:00
106
转载 [leetcode 292]Nim Game
Question: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last st...
2016-06-16 00:18:00
115
转载 [leetcode 334]Reverse String.md
Question: Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". Code: Here is Java: public class Solution { public Strin...
2016-06-14 23:46:00
132
转载 [leetcode 001]Two Sum
Question: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution. Example Given n...
2016-06-06 00:20:00
55
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人