题目链接:https://leetcode.com/problems/valid-parentheses/
Given a string containing just the characters '(', ')','{', '}', '[' and ']',
determine if the input string is valid.
The brackets m...
分类:
其他好文 时间:
2015-07-14 15:37:03
阅读次数:
109
题目:032 Longest Valid Parentheses这道题是典型的堆栈应用class Solution: # @param {string} s # @return {integer} def longestValidParentheses(self, s): ...
分类:
其他好文 时间:
2015-07-14 13:18:22
阅读次数:
102
Question:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1...
分类:
其他好文 时间:
2015-07-14 13:01:50
阅读次数:
130
@requires_authorization
@author johnsondu
@create_time 2015.7.13 11:03
@url [valid parentheses](https://leetcode.com/problems/valid-parentheses/)
/*****************
* 类别: 栈模拟判断
* 时间复杂度: O(n)
* 空间复杂度...
分类:
其他好文 时间:
2015-07-14 11:22:05
阅读次数:
97
创建Maven的Web项目:mvn archetype:generate -DgroupId=packageName -DartifactId=webappName -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeGroupId=org...
分类:
其他好文 时间:
2015-07-13 20:39:04
阅读次数:
112
一、获取插入记录主键值在创建语句的地方使用Statement.RETURN_GENERATED_KEYS标识一下,然后通过getGeneratedKeys方法获得preparedStatement=conn.prepareStatement(sql,Statement.RETURN_GENERATE...
分类:
数据库 时间:
2015-07-13 17:56:54
阅读次数:
133
1、用户模型(1)数据库迁移Rails默认使用关系数据库存储数据,数据库中的表有数据行组成,每一行都有相应的列,对应数据属性。把列名命名为相应的名字后,ActiveRecord会自动把他们识别为用户对象的属性。$ rails generate controller Users new #生成用户控制...
分类:
其他好文 时间:
2015-07-13 17:52:13
阅读次数:
97
1.创建simpleDemo,用来给各个子模块继承 1).进入命令行,输入以下命令: mvn archetype:generate -DgroupId=com.damon -DartifactId=simple-demo -DarchetypeArtifactId=maven-archetype-quickstart -Dinteracti...
分类:
其他好文 时间:
2015-07-13 14:18:31
阅读次数:
128
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:
其他好文 时间:
2015-07-13 11:39:59
阅读次数:
99
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.
If the fractional part is repeating, enclose the repeating part in parentheses.
...
分类:
其他好文 时间:
2015-07-13 10:29:56
阅读次数:
115