码迷,mamicode.com
首页 >  
搜索关键字:valid anagram    ( 3019个结果)
LeetCode Valid Palindrom
判断一个字符串是否是回文字符串,只考虑字母和数字,并且忽略大小写。...
分类:其他好文   时间:2016-04-10 16:25:48    阅读次数:176
LeetCode(38)-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 the character '.'.![这里写图片描述](http://img.blog.cs...
分类:其他好文   时间:2016-04-10 14:46:11    阅读次数:120
Longest Valid Parentheses
因为要算匹配长度,所以要记录起始的位置。思路上要分三种情况吧,一种是完全匹配,一种是未匹配的是‘)’,一种是未匹配的是‘(’。如果发现没有左括号可以和右括号匹配,那么只要把右括号位置设置为start,重新开始新一轮的寻找就可以了;如果没有右括号可以和左括号匹配,则要用当前位置减去堆栈栈顶的左括号位置 ...
分类:其他好文   时间:2016-04-10 12:42:46    阅读次数:216
Apache增加Basic Auth
在.htaccess文件中增加 AuthUserFile /var/www/htpasswd/test.htpasswd AuthName EnterPassword AuthType Basic require valid-user #htpasswd密码文件生成。Create a passwor ...
分类:Web程序   时间:2016-04-10 06:50:37    阅读次数:196
【leetcode】32. Longest Valid Parentheses
这题不能使用递归来写,因为有一个输入长度是17173,会爆栈。因此得手动模拟栈调用。 ...
分类:其他好文   时间:2016-04-10 01:01:45    阅读次数:110
【leetcode 】20. Valid Parentheses
这题需要注意: ...
分类:其他好文   时间:2016-04-09 21:51:04    阅读次数:138
leetcode:栈
1. evaluate-reverse-polish-notation Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operan ...
分类:其他好文   时间:2016-04-08 11:58:36    阅读次数:124
lintcode-medium-Restore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example Given "25525511135", return [ "255. ...
分类:其他好文   时间:2016-04-05 07:07:57    阅读次数:144
Two Strings Are Anagrams
Write a method anagram(s,t) to decide if two strings are anagrams or not. Example Given s="abcd", t="dcab", return true. 根据定义可知,两个字符串为anagrams,则每个字符出现 ...
分类:其他好文   时间:2016-04-04 22:36:53    阅读次数:135
Wiggle Sort II
Wiggle Sort II Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... 注意事项 You may assume all input has valid an ...
分类:其他好文   时间:2016-04-02 23:00:43    阅读次数:496
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!