Pre x goodness of a set string is length of longest common pre x*number of strings in the set. For
example the pre x goodness of the set f000,001,0011g is 6.You are given a set of binary strings. Fin...
分类:
其他好文 时间:
2015-04-06 01:07:22
阅读次数:
178
Palindrome Partitioning II
Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
...
分类:
其他好文 时间:
2015-04-05 22:00:12
阅读次数:
127
今天清明,再补一篇Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating l...
分类:
其他好文 时间:
2015-04-05 21:54:11
阅读次数:
134
https://leetcode.com/problems/longest-valid-parentheses/Given a string containing just the characters'('and')', find the length of the longest valid (...
分类:
其他好文 时间:
2015-04-05 21:38:33
阅读次数:
136
Java和Android对Mac地址加1或者减1
/**
* Mac + 1
* @author YOLANDA
* @return
*/
public static String getMacAdd1(String mac){
String lastChar = mac.substring(mac.length() - 1).toUpperCase(Locale.get...
分类:
移动开发 时间:
2015-04-05 16:06:13
阅读次数:
728
一:Integer to Roman
题目:
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
链接:https://leetcode.com/problems/integer-to-roman/
分析:此题...
分类:
其他好文 时间:
2015-04-05 16:02:09
阅读次数:
156
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2015-04-05 15:53:15
阅读次数:
107
将K个模板串构成一个AC自动机,那些能匹配到的单词节点都称之为禁止节点。然后问题就变成了在Tire树上走L步且不经过禁止节点的概率。根据全概率公式用记忆化搜索求解。 1 #include 2 #include 3 #include 4 using namespace std; 5 ...
分类:
其他好文 时间:
2015-04-05 15:51:35
阅读次数:
120
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-04-04 22:22:21
阅读次数:
229
练习使用字符串函数了。 1、字串的反转也是它的字串,2、最长,3、最先出现 string: #include
#include
#include
#include
#include
using namespace std; int main()
{ int t, n; string s; cin>>...
分类:
其他好文 时间:
2015-04-04 18:02:26
阅读次数:
105