摘要: 面试题3:数组中重复数字 # 使用set,时间复杂度O(n),空间复杂度O(n)class Solution(object): def findRepeatNumber(self, nums): """ :type nums: List[int] :rtype: int """ a = set([] 阅读全文
posted @ 2020-02-14 01:16 WESWES 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 用户进程缓冲区与内核缓冲区 http://www.360doc.com/content/18/0512/20/36367108_753420333.shtml linux中的页缓存和文件IO https://blog.csdn.net/gdj0001/article/details/80136364 阅读全文
posted @ 2020-01-03 11:04 WESWES 阅读(162) 评论(0) 推荐(0) 编辑
摘要: csrf(跨站请求伪造) https://www.cnblogs.com/lr393993507/p/9834856.html XSS(跨站脚本攻击) https://www.cnblogs.com/shawWey/p/8480452.html 阅读全文
posted @ 2020-01-02 17:08 WESWES 阅读(118) 评论(0) 推荐(0) 编辑
摘要: https://leetcode-cn.com/problems/spiral-matrix/submissions/ class Solution(object): def spiralOrder(self, matrix): """ :type matrix: List[List[int]] : 阅读全文
posted @ 2019-12-23 01:53 WESWES 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1、复制带随机指针的链表 class Solution(object): def copyRandomList(self, head): """ :type head: Node :rtype: Node """ if head is None: return None p = head while 阅读全文
posted @ 2019-12-22 03:11 WESWES 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 1、二叉树后序遍历 class Solution(object): def postorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ res = [] def helper(root): if not 阅读全文
posted @ 2019-12-22 01:12 WESWES 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 1、46题,全排列 https://leetcode-cn.com/problems/permutations/ class Solution(object): def permute(self, nums): """ :type nums: List[int] :rtype: List[List[ 阅读全文
posted @ 2019-12-07 17:31 WESWES 阅读(322) 评论(0) 推荐(0) 编辑
摘要: def adjust_deap(arr, p, b): while True: if 2 * p + 1 > b - 1: break elif 2 * p + 2 < b and arr[2 * p + 2] > arr[2 * p + 1] and arr[2 * p + 2] > arr[p]: arr[p], arr[2 * p + 2] = arr[2 * p + 2], arr[p] 阅读全文
posted @ 2019-09-06 02:19 WESWES 阅读(238) 评论(0) 推荐(0) 编辑
摘要: python条件变量知识参考:https://www.cnblogs.com/holbrook/archive/2012/03/13/2394811.html 阅读全文
posted @ 2019-09-05 22:29 WESWES 阅读(1354) 评论(0) 推荐(0) 编辑
摘要: 准备类型命令 生成ssh秘钥(密码可以留空): 配置用户信息(安装后第一件事): 功能型命令 删除文件(文件与仓库): 文件取消版本控制(但在本地依旧保存): 撤回暂存区文件: 已push的最好使用revert回退(保留回退前文件记录): 撤销对工作区文件修改(恢复至上次提交时的状态): 保存当前分 阅读全文
posted @ 2019-06-29 17:12 WESWES 阅读(181) 评论(0) 推荐(0) 编辑