摘要: ```cpp#include #include #include #include using namespace std;class Solution {public: bool isValid(string s) { stack parenStack; char... 阅读全文
posted @ 2014-08-16 19:01 Haeckel 阅读(119) 评论(0) 推荐(0) 编辑
摘要: ## Method I```cppclass Solution {public: int singleNumber(int A[], int n) { int mySum = 0, sum = 0; maptoolMap; for(int i = 0;... 阅读全文
posted @ 2014-08-16 09:52 Haeckel 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?```cpp#include struct ListNode { int... 阅读全文
posted @ 2014-08-16 09:51 Haeckel 阅读(200) 评论(0) 推荐(0) 编辑
摘要: # KMP 标签(空格分隔): Data-Structure---照着金叔课本来的,因为看了其他各种版本,各种混乱8.15 普通解法 #include #include using namespace std; //textbook, the regular solution void g... 阅读全文
posted @ 2014-08-16 09:45 Haeckel 阅读(134) 评论(0) 推荐(0) 编辑