The end of otherFor language training our Robots want to learn about suffixes.In this task, you are given a set of words in lower case. Check whether ...
分类:
编程语言 时间:
2014-07-09 21:54:26
阅读次数:
200
Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exampl...
分类:
其他好文 时间:
2014-07-09 00:53:55
阅读次数:
277
Given an input string, reverse the string word by word.
分类:
其他好文 时间:
2014-07-08 22:41:34
阅读次数:
187
欧拉回路问题。
题意是说给你一些字符串,类似于成语接龙,上一个字符串尾字母必须和下一个字符串首字母相同。
把所有字符串连成一串。
根据定理判断欧拉通路,然后DFS判连通(并查集也可)
没注意题意 字符串开了str[100] 结果RE。结果字符串最长有1000.改了就AC了。
#include
#include
#include
#include
#include
...
分类:
其他好文 时间:
2014-07-08 18:04:02
阅读次数:
168
You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati...
分类:
其他好文 时间:
2014-07-06 19:09:21
阅读次数:
169
Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You should p...
分类:
其他好文 时间:
2014-07-06 16:10:10
阅读次数:
138
Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exampl...
分类:
其他好文 时间:
2014-07-06 16:06:45
阅读次数:
198
题目如下:
Play on Words
Some of the secret doorscontain a very interesting word puzzle. The team of archaeologists has tosolve it to open that doors. Because there is no other way to open the doors,...
分类:
其他好文 时间:
2014-07-06 12:12:36
阅读次数:
221
陆陆续续几个月下来,终于把题刷完了,过程中遇到的python的题解很少,这里重新用python实现下,所以题解可能都是总结性的,或者是新的心得,不会仅针对题目本身说的太详细。
def reverseWords(self, s):
s = ' '.join(s.split()[::-1])
return s
[ : : -1 ] 是将元素进行翻转...
分类:
编程语言 时间:
2014-07-06 00:37:50
阅读次数:
299
For the exercises in this chapter we need a list of English words. There are lots of word lists available on the Web, but the most suitable for our pu...
分类:
其他好文 时间:
2014-07-05 22:45:55
阅读次数:
545