上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: 1.人们如何做出决策 how people make decisions 人们面临得失交换(权衡取舍)people face tradeoffs 某物的成本是为此所放弃的东西 the cost of something is what you give up to get it 理性人思考边际量 r 阅读全文
posted @ 2020-04-19 21:14 爱简单的Paul 阅读(778) 评论(0) 推荐(0) 编辑
摘要: 1.待更 阅读全文
posted @ 2020-04-12 22:02 爱简单的Paul 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 在给定的网格中,每个单元格可以有以下三个值之一: 值 0 代表空单元格;值 1 代表新鲜橘子;值 2 代表腐烂的橘子。每分钟,任何与腐烂的橘子(在 4 个正方向上)相邻的新鲜橘子都会腐烂。 返回直到单元格中没有新鲜橘子为止所必须经过的最小分钟数。如果不可能,返回 -1。 示例 1: 输入:[[2,1 阅读全文
posted @ 2020-03-06 23:51 爱简单的Paul 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 给定一个整数 n,求以 1 ... n 为节点组成的二叉搜索树有多少种? 示例: 输入: 3输出: 5解释:给定 n = 3, 一共有 5 种不同结构的二叉搜索树: 1 3 3 2 1 \ / / / \ \ 3 2 1 1 3 2 / / \ \ 2 1 2 3 来源:力扣(LeetCode)链接 阅读全文
posted @ 2020-02-29 22:02 爱简单的Paul 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 前端 --> 后台- 唐诗宋词 诗词 原文 , 注释 及翻译(文本形式), 附注视频,开放评论,建设社区 阅读全文
posted @ 2020-02-22 18:36 爱简单的Paul 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 占坑 阅读全文
posted @ 2020-02-17 22:23 爱简单的Paul 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 根据每日 气温 列表,请重新生成一个列表,对应位置的输入是你需要再等待多久温度才会升高超过该日的天数。如果之后都不会升高,请在该位置用 0 来代替。 例如,给定一个列表 temperatures = [73, 74, 75, 71, 69, 72, 76, 73],你的输出应该是 [1, 1, 4, 阅读全文
posted @ 2020-02-16 12:00 爱简单的Paul 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1. 112题 题目地址:https://leetcode-cn.com/problems/path-sum/description/ 题目描述:给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 解决方案: 递归判断 2. (二)113题 题 阅读全文
posted @ 2020-02-09 22:51 爱简单的Paul 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 1.perf Perf 是内置于Linux 内核源码树中的性能剖析(profiling)工具。它基于事件采样原理,以性能事件为基础,支持针对处理器相关性能指标与操作系统相关性能指标的性能剖析。可用于性能瓶颈的查找与热点代码的定位。linux2.6及后续版本都自带该工具,几乎能够处理所有与性能相关的事 阅读全文
posted @ 2019-10-29 22:39 爱简单的Paul 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 程序中一般 读取 /proc/meminfo 文件,跟据 MemTotal 和 MemAvailable 两个参数来进行判断。即:MemAvailable *100 /MemTotal 。 但是有些系统没有 MemAvailable 这个参数(内核3.14 以上支持,百度看)。需要自己计算一下: h 阅读全文
posted @ 2019-10-21 16:39 爱简单的Paul 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 博客参考 :http://www.cnhalo.net/2016/06/13/memory-optimize/ 1、系统的物理内存是有限的,而对内存的需求是变化的, 程序的动态性越强,内存管理就越重要,选择合适的内存管理算法会带来明显的性能提升。 阅读全文
posted @ 2019-09-23 23:39 爱简单的Paul 阅读(1126) 评论(0) 推荐(0) 编辑
摘要: 给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式。 示例 1: 输入: num1 = "2", num2 = "3"输出: "6"示例 2: 输入: num1 = "123", num2 = "456"输出: "56088 阅读全文
posted @ 2019-09-23 23:35 爱简单的Paul 阅读(194) 评论(0) 推荐(0) 编辑
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2019-08-20 23:14 爱简单的Paul 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 380. Insert Delete GetRandom O(1) Medium 126395FavoriteShare 380. Insert Delete GetRandom O(1) Medium 126395FavoriteShare Medium Design a data structu 阅读全文
posted @ 2019-08-19 23:32 爱简单的Paul 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 启动程序时,无法正常启动,程序直接没有 被系统kill(dmesg | egrep -i -B100 'killed process'), 发现 shared memory , cache 占用过高 常用的命令: 按内存占用排序:ps -eo rss,pmem,pcpu,vsize,args | s 阅读全文
posted @ 2019-08-14 23:43 爱简单的Paul 阅读(4260) 评论(0) 推荐(0) 编辑
摘要: Given a collection of intervals, merge all overlapping intervals. Example 1: Example 2: NOTE: input types have been changed on April 15, 2019. Please 阅读全文
posted @ 2019-08-13 23:41 爱简单的Paul 阅读(153) 评论(0) 推荐(0) 编辑
摘要: In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (wi 阅读全文
posted @ 2019-08-11 18:39 爱简单的Paul 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1. supervisorctl start xxx 的用法 2. gdb attach pid 阅读全文
posted @ 2019-08-11 17:57 爱简单的Paul 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Implement a trie with insert, search, and startsWith methods. Example: Note: You may assume that all inputs are consist of lowercase letters a-z. All 阅读全文
posted @ 2019-08-10 00:21 爱简单的Paul 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: 阅读全文
posted @ 2019-08-06 22:53 爱简单的Paul 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页