摘要:
暴力求解法,直接遍历求最大值 class Solution { public: int maxProfit(vector<int>& prices) { int maxprofit=0; for(int i=0;i<prices.size();i++) { for(int j=i+1;j<price 阅读全文
posted @ 2021-04-02 12:18
章大佬
阅读(37)
评论(0)
推荐(0)
摘要:
调用反向迭代器函数,rbegin,rend,判断回文串 class Solution { public: bool isPalindrome(string s) { string sgood; for (char ch: s) { if (isalnum(ch)) { sgood += tolowe 阅读全文
posted @ 2021-04-02 12:04
章大佬
阅读(50)
评论(0)
推荐(0)

浙公网安备 33010602011771号