- 博客(14)
- 收藏
- 关注
原创 No.183 - LeetCode1324
class Solution {public: vector<string> printVertically(string s) { int N = s.length(); vector<string> ans; int cnt = 0; int level = 0; for(int ...
2020-01-23 21:42:37 201
原创 No.182 - LeetCode1325 - C指针的魅力
leetcode 不需要delete内存,项目中切记赋值NULL前deleteclass Solution {public: void dfs(TreeNode** now,int target){ if((*now)->left != NULL) dfs(&((*now)->left),target); if((*now)->...
2020-01-20 21:41:39 119
原创 No.181 - LeetCode1326 - (经典)区间覆盖
class Solution {public: int minTaps(int n, vector<int>& ranges) { vector<pair<int,int>> nap; for(int i=0;i<ranges.size();i++){ nap.push_back(m...
2020-01-20 18:17:28 359
原创 go:chromedp包
非常好的教程:https://zhangguanzhang.github.io/2019/07/14/chromedp/玩chromedp一共注意三部分:1,options配置options := []chromedp.ExecAllocatorOption{ // false意味展示浏览器窗口,默认true chromedp.Flag("headless", false), ...
2020-01-17 14:54:47 1181
原创 FE:http状态码
406很好的一个分析https://juejin.im/entry/5a0e4976f265da431b6cc5dc406 Not Acceptable 状态码表示客户端错误,表示请求的资源的内容特性无法满足请求头中的条件,因而无法生成响应实体。 译自HTTP协议规范RFC文档即,如果请求头的 Accept字段 不符合事先约定的契约,就会返回406错误。CDN,Content Del...
2020-01-16 14:34:10 539
原创 Mac:终端实用快捷键
Ctrl+a // 跳到行首Ctrl+e // 跳到行尾Ctrl+u // 删除光标前所有Ctrl+k // 删除光标后所有Ctrl+w // 删除光标前单词Ctrl+l // 清屏Ctrl+y // 恢复上次删除的内容...
2020-01-15 17:47:37 255
原创 go:gorm包
GORM中文文档http://gorm.book.jasperxu.com/操作一张表,一般对应一个model包下的struct,总结几条规则:type Animal struct { AnimalId int64 `gorm:"primary_key"` // 设置AnimalId为主键 AgeTime int64 // 自动对应表中age...
2020-01-15 17:38:02 692
原创 python:peewee包
peewee是python对sql很好对一个封装操作一个数据库表,必须对应一个model,包含各种Field对应数据表字段peewee 逻辑符只支持,多个条件上括号& #and| #or~ #not增\red{增}增createbulk_createsaveinsertinsert_manybatch_commitinsert_from常用单条插入:...
2020-01-15 15:54:12 796
原创 No.180 - LeetCode1313
class Solution {public: vector<int> decompressRLElist(vector<int>& nums) { vector<int> ans; int N = nums.size(); for(int i=0;i<N;i+=2){ ...
2020-01-14 17:22:14 160
原创 No.179 - LeetCode1312 - (经典)插入最少字符成为回文串
预处理长度为2以内的字符串剩下交给dpclass Solution {public: int minInsertions(string s) { int N = s.length(); vector<vector<int>> dp(N,vector<int>(N,N)); for(int i=0;i&...
2020-01-09 20:55:38 344
原创 No.178 - LeetCode1311
pair数组排序默认按first升序class Solution {public: vector<string> watchedVideosByFriends(vector<vector<string>>& watchedVideos, vector<vector<int>>& friends, int id,...
2020-01-09 18:41:46 154
原创 No.177 - LeetCode1310
class Solution {public: vector<int> xorQueries(vector<int>& arr, vector<vector<int>>& queries) { int N = arr.size(); vector<int> pre(N+1,0);...
2020-01-09 18:04:41 153
原创 No.176 - LeetCode1309
class Solution {public: string freqAlphabets(string s) { int N = s.length(); string ans = ""; for(int i=0;i<N;i++){ if(i+2<N && s[i+2] == '#'){ ...
2020-01-09 17:59:12 119
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人