2020年3月22日

摘要: 1、常见贪心算法题目 中等:55. 跳跃游戏https://leetcode-cn.com/problems/jump-game/134. 加油站https://leetcode-cn.com/problems/gas-station/ 困难:45. 跳跃游戏 IIhttps://leetcode- 阅读全文
posted @ 2020-03-22 11:44 行者常至,为者长成 阅读(135) 评论(0) 推荐(0)
 
摘要: 1、若题目中明确说明只包含字母,可以考虑哈希表 LeetCode常见题型: 1、字符串的排列https://leetcode-cn.com/problems/permutation-in-string/ 2、 拼写单词https://leetcode-cn.com/problems/find-wor 阅读全文
posted @ 2020-03-22 11:42 行者常至,为者长成 阅读(84) 评论(0) 推荐(0)
 
摘要: 1、输入输出#include<iostream>using namespace std;int n;cin>>n;cout<< n<<endl; 字符串注意:cin提取始终将空格(空格,制表符,换行符...)视为终止要提取的值,因此提取字符串意味着始终提取单个单词,而不是短语或整个句子。cin>>s 阅读全文
posted @ 2020-03-22 11:40 行者常至,为者长成 阅读(220) 评论(0) 推荐(0)