Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
The brackets must close in t...
分类:
其他好文 时间:
2015-01-24 01:35:02
阅读次数:
173
今天读书发现一个很有趣的问题请问以下程序会输出什么? public class Test2 { public static void main(String[] args) { int j = 0; for (int i = 0; i <...
分类:
编程语言 时间:
2015-01-24 00:27:20
阅读次数:
214
一、分类基本数据类型:undefined、null、string、Boolean、number复杂数据类型:objectobject的属性以无序的名称和值对的形式 (name : value) 来定义1.1 、typeof操作符鉴于ECMAScript是松散型的,因此需要一种手段来检测给定的变量的数...
分类:
编程语言 时间:
2015-01-24 00:24:33
阅读次数:
275
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'20: Valid Parentheseshttps://oj.leetcode.com/problems/valid-parentheses/Given a string con...
分类:
编程语言 时间:
2015-01-24 00:21:16
阅读次数:
364
public static void main(String[] args) throws IOException {
Connection.Response res = Jsoup.connect("http://***.com/authorize")
.data("u", "123456789@123.com", "pwd", "****","k","y","op","l")...
分类:
Web程序 时间:
2015-01-23 23:02:10
阅读次数:
203
Write a function to find the longest common prefix string amongst an array of strings.
题意:求字符串数组的最长公共前缀
思路:首先找到最短的那个作为标尺,然后每次比较。
class Solution {
public:
string longestCommonPrefix(vector &st...
分类:
其他好文 时间:
2015-01-23 21:38:51
阅读次数:
147
//throw yichang();//此时必须得加上括号
//作用:(均在catch{}里体现)
// 1.报告错误
// 2.修正错误
#include
#include
using namespace std;
class yichang {
string s;
public:
yichang(string str="自定义异常\n"):s(str){}
void wha...
分类:
其他好文 时间:
2015-01-23 21:38:19
阅读次数:
171
【题目】
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" ar...
分类:
其他好文 时间:
2015-01-23 21:34:47
阅读次数:
181
JUnit中的assert方法全部放在Assert类中,现在总结一下经常用到的junit类中assert方法。
1.assertTrue/False([String message],boolean condition) 判断一个条件是true还是false。
2.fail([String mess...
分类:
其他好文 时间:
2015-01-23 21:26:05
阅读次数:
156
题目Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters ...
分类:
其他好文 时间:
2015-01-23 21:19:32
阅读次数:
187