摘要: 代码:暴力算法 1 class Solution { 2 public: 3 int strStr(char *haystack, char *needle) { 4 if (!*needle) 5 return 0; 6 int al... 阅读全文
posted @ 2015-03-03 19:46 Azurewing 阅读(174) 评论(0) 推荐(0)
摘要: 代码: 1 1 class Solution { 2 2 public: 3 3 int removeElement(int A[], int n, int elem) { 4 4 int index = 0; 5 5 for (int i = 0;... 阅读全文
posted @ 2015-03-03 10:25 Azurewing 阅读(180) 评论(0) 推荐(0)
摘要: 代码:class Solution {public: bool isValid(string s) { string left = "([{"; string right = ")]}"; stack stk; for(auto c : ... 阅读全文
posted @ 2015-03-03 00:11 Azurewing 阅读(118) 评论(0) 推荐(0)