摘要:
//递归做的 开始用动态规划做 类似通配符问题 总感觉有问题 答案里面用dp做的多多少少有点问题 //估计是我水平太低 //只是其中一个带符号! class Solution { public: bool match(char* str, char* pattern) { if(str==NULL||pattern==NULL) { ... 阅读全文
摘要:
class Solution { public: bool isNumeric(char* string) { if(string == NULL) return false; if(*string == '+' || *string == '-') string++; ... 阅读全文
摘要:
class Solution { string str; int hash[256]; public: //Insert one char from stringstream void Insert(char ch) { str.push_back(ch); hash[ch]++; } //return the fi... 阅读全文
摘要:
class Solution { public: int LastRemaining_Solution(int n, int m) { if (n0) { ++i; if (i >= n) { i = 0; } ... 阅读全文
摘要:
class Solution { public: bool IsContinuous(vector numbers) { int max_num = -1; int min_num = 14; int in_size = numbers.size(); if (in_size != 5) return fal... 阅读全文