感觉题意不太好懂 = =#给两个字符串 问是否等价等价的定义(满足其中一个条件):1.两个字符串相等 2.字符串均分成两个子串,子串分别等价因为超时加了ok函数剪枝,93ms过的。#include #include #define clr(x,c) memset(x,c,sizeof(x))usin...
分类:
其他好文 时间:
2016-01-19 15:40:19
阅读次数:
121
题目链接:https://leetcode.com/problems/valid-anagram/
题目:Given two strings s and t,
write a function to determine if t is
an anagram of s.
For example,
s = "anagram", t = "nagaram", return true...
分类:
其他好文 时间:
2016-01-19 10:45:10
阅读次数:
123
问题:给定一个有限集,试列出其幂集中的所有元素。解决方法1:To generate all subsets of S,list all 2nbit strings of length n(for instence, in increasing order),andwrite down the cor...
分类:
其他好文 时间:
2016-01-17 14:49:08
阅读次数:
167
Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ...
分类:
其他好文 时间:
2016-01-16 21:11:26
阅读次数:
197
Given k strings, find the longest common prefix (LCP).ExampleFor strings "ABCD", "ABEF" and "ACEF", the LCP is "A"For strings "ABCDEFG", "ABCEFG" and ...
分类:
其他好文 时间:
2016-01-16 07:36:37
阅读次数:
119
5. Longest Palindromic SubstringMy SubmissionsQuestionTotal Accepted:87802Total Submissions:399054Difficulty:MediumGiven a stringS, find the longest p...
分类:
编程语言 时间:
2016-01-15 20:02:14
阅读次数:
227
package cn.edu.xidian.sselab.hashtable;import java.util.HashMap;/*** * @author zhiyong wang* title: Valid Anagram* content:* Given two strings s and t...
分类:
其他好文 时间:
2016-01-14 23:48:14
阅读次数:
201
题目:Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t...
分类:
其他好文 时间:
2016-01-14 20:39:58
阅读次数:
144
问题描写叙述: Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case. 比如:输入为:{abc,bca,123,...
分类:
其他好文 时间:
2016-01-13 19:41:30
阅读次数:
104
package mainimport ( "crypto/md5" "fmt" "html/template" "io" "log" "net/http" "strconv" "strings" "time")func sayHelloName(...
分类:
Web程序 时间:
2016-01-12 13:25:27
阅读次数:
217