题目链接:https://leetcode.com/problems/unique-binary-search-trees/从最简单的情况开始考虑:n = 0 : 只有“空树”这一种情况。f[0] = 1。n = 1 : 只有“根节点”这一种情况。f[1] = 1。 n = 2 :由于“根节点”必须...
分类:
其他好文 时间:
2015-03-27 23:47:24
阅读次数:
236
问题来源:https://leetcode.com/problems/unique-binary-search-trees//**
*
*
* ClassName UniqueBinarySearchTrees
*
*
* Description Given n, how many structurally unique BST's (binary searc...
分类:
其他好文 时间:
2015-03-21 12:40:04
阅读次数:
135
问题来源:https://leetcode.com/problems/subsets/import java.util.ArrayList;
import java.util.Collections;
import java.util.List;/**
*
*
* ClassName Subsets
*
*
* Description Given a set...
分类:
其他好文 时间:
2015-03-21 11:21:12
阅读次数:
147
https://leetcode.com/problems/trapping-rain-water/Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute ...
分类:
移动开发 时间:
2015-03-20 23:31:14
阅读次数:
204
https://leetcode.com/problems/candy/There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these child...
分类:
其他好文 时间:
2015-03-20 21:38:33
阅读次数:
148
记录一下最近的pom的相关设置,plugin的官方地址配置:http://maven.apache.org/plugins/index.html看了网上说了很多例子,有很多不清楚,看一下官方的,会有新的发现:1、修改plugin的配置之后,项目出现“x”的错误提示,看一下problems,说是pro...
分类:
其他好文 时间:
2015-03-20 17:50:09
阅读次数:
115
问题来源:https://leetcode.com/problems/longest-consecutive-sequence/import java.util.Arrays;/**
*
*
* ClassName LongestConsecutiveSequence
*
*
* Description Given an unsorted array of i...
分类:
其他好文 时间:
2015-03-20 16:26:45
阅读次数:
115
Fault Diagnosability Infrastructure OverviewThe fault diagnosability infrastructure aids in preventing, detecting, diagnosing, and resolving problems....
分类:
其他好文 时间:
2015-03-20 15:56:33
阅读次数:
99
https://leetcode.com/problems/compare-version-numbers/Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1 Integer.p...
分类:
其他好文 时间:
2015-03-20 14:20:07
阅读次数:
101
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'42: Trapping Rain Waterhttps://oj.leetcode.com/problems/trapping-rain-water/Given n non-ne...
分类:
移动开发 时间:
2015-03-20 01:16:24
阅读次数:
184