Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-06-06 10:25:13
阅读次数:
115
为了在运行中避免可能出现的危险,即当string emuStack为空,emuStack.begin()和emuStack.end()是什么。采取的策略是先将emuStack重置为非空,再进行其他操作,这样就永远不可能碰到底部。
#include
#include
using namespace std;
class Solution {
public:
bool isValid(st...
分类:
其他好文 时间:
2015-06-06 09:18:14
阅读次数:
108
上代码: public static void main(String[] args) { int j = 0; for (int i = 0; i _<:: 还是python好,直接对++--unsupport来自为知笔记(Wiz)
分类:
编程语言 时间:
2015-06-06 06:48:27
阅读次数:
140
public class Solution { public int minDistance(String word1, String word2) { if(word1==null||word1.length()==0) return word2.length(); ...
分类:
其他好文 时间:
2015-06-06 01:40:16
阅读次数:
98
package www.KINDA.com.cn.io;import java.io.File;import java.io.IOException;public class FileDemo2 { public static void main(String[] args) throws IOEx...
分类:
其他好文 时间:
2015-06-06 01:37:33
阅读次数:
145
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating,...
分类:
编程语言 时间:
2015-06-06 00:11:41
阅读次数:
136
#include
#include
using namespace std;
class String
{
public:
String(const char *str = " ")
{
m_data = new char[strlen(str) + 1];
strcpy(m_data, str);
count++;
}
String(const String &s)
...
分类:
编程语言 时间:
2015-06-05 22:49:07
阅读次数:
162
条款1:仔细选择你的容器了解各种容器的实现方法,知道各种容器的内存管理方式、各种操作所对应的底层操作,然后根据需要选择恰当的容器。对于容器的分类:标准STL序列容器:vector,string,deque和list
标准STL关联容器:set,multiset,map和multimap
非标准序列容器:slist(单向链表)和rope(重型字符串——不懂)
非标准关联容器:hash_set,h...
分类:
其他好文 时间:
2015-06-05 22:48:02
阅读次数:
151
QuestionGiven an input string, reverse the string word by word. For example,
Given s = “the sky is blue“,
return “blue is sky the“.Answerdef reverseWords(s):
return ' '.join(filter(lambda x:x !=...
分类:
编程语言 时间:
2015-06-05 22:47:36
阅读次数:
299