![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
Frank.Ginger
coder
展开
-
动态规划-背包问题
https://www.cnblogs.com/mfrank/p/10849505.html转载 2020-03-10 17:42:49 · 97 阅读 · 0 评论 -
字符串转整形 atoi()
class Solution {public: int myAtoi(string str) { const char *p = str.c_str(); int ret = 0; int sign = 1; while (isspace(*p)) p++; // 过滤前面的空格 ...原创 2019-04-12 17:25:22 · 198 阅读 · 0 评论 -
幂运算 power()
class Solution {public: double myPow(double x, int n) { bool down = true; // 负数次方时为倒数 bool sign = true; // if (n < 0) down = false;...原创 2019-04-16 18:23:44 · 414 阅读 · 0 评论 -
子串匹配 strStr()
int strStr(string haystack, string needle){ if (needle.empty()) return 0; if (haystack.empty() && !needle.empty()) return -1; const char *hp =...原创 2019-04-17 17:30:54 · 672 阅读 · 0 评论