Problem: 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 = " ...
分类:
其他好文 时间:
2016-05-29 21:23:26
阅读次数:
109
Description You are to write a program that has to generate all possible words from a given set of letters. Example: Given the word "abc", your progra ...
分类:
其他好文 时间:
2016-05-22 16:35:19
阅读次数:
180
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-05-17 17:49:47
阅读次数:
120
242. 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 ...
分类:
编程语言 时间:
2016-05-14 18:40:07
阅读次数:
175
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-05-10 20:52:44
阅读次数:
233
题目:给定两个字符串s和t,写出一个程序判断s是否为t的回文字符串。例:s=”anagram”, t=”nagaram” 返回trues=”car”, t=”ant” 返回false解题思路1:使用sorted函数,将字符串排序,如:sorted(s)=[‘a’,’a’,’a’,’g’,’m’,’n’,’r’],sorted(t)=[‘a’,’a’,’a’,’g’,’m’,’n’,’r’]代码1:...
分类:
其他好文 时间:
2016-05-06 12:47:46
阅读次数:
144
题目: 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", ...
分类:
其他好文 时间:
2016-04-19 19:32:52
阅读次数:
118
题目: 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", ...
分类:
其他好文 时间:
2016-04-17 06:16:30
阅读次数:
129
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-04-12 19:03:10
阅读次数:
173
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