码迷,mamicode.com
首页 >  
搜索关键字:valid characters    ( 4838个结果
Longest Valid Parentheses
难点1,是栈,2是流程class Solution {public: int longestValidParentheses(string s) { stack mstack; char cbefore; int count = 0; if(s.empt...
分类:其他好文   时间:2015-01-11 12:14:33    阅读次数:119
【leetcode】Wildcard Matching
Wildcard MatchingImplement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters...
分类:其他好文   时间:2015-01-10 22:20:52    阅读次数:222
[LeetCode#93]Restore IP Addresses
The problem:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",r...
分类:其他好文   时间:2015-01-10 01:03:04    阅读次数:318
spoj 1812
1812. Longest Common Substring IIProblem code: LCS2A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the s...
分类:其他好文   时间:2015-01-09 22:06:32    阅读次数:339
【leetcode系列】Valid Parentheses
非常经典的问题,使用栈来解决,我这里自己实现了一个栈,当然也能够直接用java自带的Stack类。自己实现的栈代码:import java.util.LinkedList;class StackOne { LinkedList data; int top; int maxSize; StackOne...
分类:其他好文   时间:2015-01-09 12:00:02    阅读次数:155
linux 命令之——sort
名称:sort 位置:/usr/bin/sort 权限:所有用户 用法: sort [OPTION]... [FILE]... sort [OPTION]... --files0-from=F 选项: -b --ignore-leading-blanks 忽略最前面的空格 -f --ignore-case fold lower case to upper case characters 忽略字母的大小写 ...
分类:系统相关   时间:2015-01-09 09:20:23    阅读次数:269
LeetCiode--Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all va...
分类:其他好文   时间:2015-01-09 09:16:29    阅读次数:149
django 学习个人总结 之form表单提交
fromdjango.shortcutsimportrender_to_response fromdjangoimportforms fromdjango.httpimportHttpResponse classUserForm(forms.Form): name=forms.CharField() defregister(req): ifreq.method==‘POST‘: form_object=UserForm(req.POST) ifform_object.is_valid(): printfo..
分类:其他好文   时间:2015-01-09 01:52:51    阅读次数:156
[LeetCode#98]Validate Binary Search Tree
The problem:Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node con...
分类:其他好文   时间:2015-01-09 00:07:50    阅读次数:208
LeetCode Valid Sudoku
Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ...
分类:其他好文   时间:2015-01-09 00:03:00    阅读次数:259
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!