Title: 斯潘的博客 | BY Blog
Description: Every failure is leading towards success.
Keywords:
Domain: pamleft.github.io
| None | IE=edge |
| google-site-verification | xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI |
| theme-color | #000000 |
Links:
| BY Blog | https://pamleft.github.io/ |
| Home | https://pamleft.github.io/ |
| About | https://pamleft.github.io/about/ |
| Tags | https://pamleft.github.io/tags/ |
| 全排列字典序 前言 好久没更新,水一题 正文 问题来源 本问题来自leetcode上的类似题。 问题描述 全排列字典序。 分析: func reverse(arr []int, i, j int) { for i < j { arr[i], arr[j] = arr[j], arr[i] i = i+1 j = j-1 ... | https://pamleft.github.io/2022/03/28/%E5%85%A8%E6%8E%92%E5%88%97%E5%AD%97%E5%85%B8%E5%BA%8F/ |
| leetcode1922统计好数字的数目 leetcode 1922 Count Good Numbers 前言 好久没更新,1024水一题 正文 问题来源 本问题来自leetcode上的1922题。 问题描述 我们称一个数字字符串是 好数字 当它满足(下标从 0 开始)偶数 下标处的数字为 偶数 且 奇数 下标处的数字为 质数 (2,3,5 或 7)。 比方说,”2582” 是好数字,因为偶数下标处的数字(2 和 8)是偶数且奇数下标处的数字(5 和 2)为质数。但 ”3245” 不... | https://pamleft.github.io/2021/10/24/leetcode1922%E7%BB%9F%E8%AE%A1%E5%A5%BD%E6%95%B0%E5%AD%97%E7%9A%84%E6%95%B0%E7%9B%AE/ |
| leetcode1154一年中的第几天 leetcode 1154 Day of the Year 前言 好久没更新,下班水一题 正文 问题来源 本问题来自leetcode上的1154题。 问题描述 给你一个按 YYYY-MM-DD 格式表示日期的字符串 date,请你计算并返回该日期是当年的第几天。 通常情况下,我们认为 1 月 1 日是每年的第 1 天,1 月 2 日是每年的第 2 天,依此类推。每个月的天数与现行公元纪年法(格里高利历)一致。 示例 1: 输入:date... | https://pamleft.github.io/2021/09/12/leetcode1154%E4%B8%80%E5%B9%B4%E4%B8%AD%E7%9A%84%E7%AC%AC%E5%87%A0%E5%A4%A9/ |
| leetcode1450在既定时间做作业的学生人数 leetcode 1450 Number of Students Doing Homework at a Given Time 前言 好久没更新,下班水一题 正文 问题来源 本问题来自leetcode上的1450题。 问题描述 给你两个整数数组 startTime(开始时间)和 endTime(结束时间),并指定一个整数 queryTime 作为查询时间。 已知,第 i 名学生在 startTime[i] 时开始写作业并于 endTime[i] 时完成作业。 请返回在查询时间 queryTime 时正在做... | https://pamleft.github.io/2021/09/08/leetcode1450%E5%9C%A8%E6%97%A2%E5%AE%9A%E6%97%B6%E9%97%B4%E5%81%9A%E4%BD%9C%E4%B8%9A%E7%9A%84%E5%AD%A6%E7%94%9F%E4%BA%BA%E6%95%B0/ |
| leetcode1671 得到山形数组的最少删除次数 leetcode 1671 Minimum Number of Removals to Make Mountain Array 前言 持续更新了 正文 问题来源 本问题来自leetcode上的1671题。 问题描述 我们定义 arr 是 山形数组 当且仅当它满足: arr.length >= 3 存在某个下标 i (从 0 开始) 满足 0 < i < arr.length - 1 且: arr[0] < arr[1] < … < arr[i - 1] < arr... | https://pamleft.github.io/2021/06/06/leetcode1671%E5%BE%97%E5%88%B0%E5%B1%B1%E5%BD%A2%E6%95%B0%E7%BB%84%E7%9A%84%E6%9C%80%E5%B0%91%E5%88%A0%E9%99%A4%E6%AC%A1%E6%95%B0/ |
| leetcode1710 卡车上的最大单元数 leetcode 1710 Maximum Units on a Truck 前言 持续更新了 正文 问题来源 本问题来自leetcode上的1710题。 问题描述 请你将一些箱子装在 一辆卡车 上。给你一个二维数组 boxTypes ,其中 boxTypes[i] = [numberOfBoxesi, numberOfUnitsPerBoxi] : numberOfBoxesi 是类型 i 的箱子的数量。 numberOfUnitsPerBoxi 是类型... | https://pamleft.github.io/2021/05/31/leetcode1710%E5%8D%A1%E8%BD%A6%E4%B8%8A%E7%9A%84%E6%9C%80%E5%A4%A7%E5%8D%95%E5%85%83%E6%95%B0/ |
| leetcode429 N叉树的层序遍历 leetcode 429 N-ary Tree Level Order Traversal 前言 持续更新了 正文 问题来源 本问题来自leetcode上的429题。 最近工作压力有点大,早上起来做道题解解压。 问题描述 给定一个 N 叉树,返回其节点值的层序遍历。(即从左到右,逐层遍历)。 树的序列化输入是用层序遍历,每组子节点都由 null 值分隔(参见示例)。 示例 1: 输入:root = [1,null,3,2,4,null,5,6] 输出:[[1],[3,... | https://pamleft.github.io/2021/05/22/leetcode429N%E5%8F%89%E6%A0%91%E7%9A%84%E5%B1%82%E5%BA%8F%E9%81%8D%E5%8E%86/ |
| shFlags简介 shFlags summary 问题来源 看百度的开源代码braft的时候发现例子程序中有使用到shFlags来启动服务 来源shFlags简介 使用例子 #!/bin/sh # source shflags . /path/to/shflags # define a 'name' command-line string flag DEFINE_string 'name' 'world' 'name to say ... | https://pamleft.github.io/2021/01/07/shFlags%E7%AE%80%E4%BB%8B/ |
| df和du df and du 一、什么是空洞文件? +=======+-------+====+ start end a b 定义:从文件结尾到新写入的文件之间的这段空间被称之为:文件空洞,如上图中从end到a之间的一段就是文件空洞。 空洞文件必须满足2个条件: (1)写文件时超出文件结尾 (2)超出之后继续写文件 lseek()系统调用可以改变文件的偏移量,但如果程序调用使得文件偏移量跨越了文件... | https://pamleft.github.io/2020/12/18/df%E4%B8%8Edu/ |
| leetcode860柠檬水找零 leetcode 860 Lemonade Change 前言 持续更新了 正文 问题来源 本问题来自leetcode上的860题。 问题描述 在柠檬水摊上,每一杯柠檬水的售价为 5 美元。 顾客排队购买你的产品,(按账单 bills 支付的顺序)一次购买一杯。 每位顾客只买一杯柠檬水,然后向你付 5 美元、10 美元或 20 美元。你必须给每个顾客正确找零,也就是说净交易是每位顾客向你支付 5 美元。 注意,一开始你手头没有任何零钱。... | https://pamleft.github.io/2020/12/10/leetcode860%E6%9F%A0%E6%AA%AC%E6%B0%B4%E6%89%BE%E9%9B%B6/ |
| Older Posts → | https://pamleft.github.io/page2 |
| FEATURED TAGS | https://pamleft.github.io/tags/ |
| Blog | https://pamleft.github.io/tags/#Blog |
| ABOUT ME | https://pamleft.github.io/about/ |
| https://pamleft.github.io/about | |
| https://twitter.com/pamleft1994 | |
| 知 | https://www.zhihu.com/people/ni-fan-bu-fan-17 |
| https://github.com/pamleft | |
| https://twitter.com/pamleft1994 | |
| 知 | https://www.zhihu.com/people/ni-fan-bu-fan-17 |
| https://github.com/pamleft | |
| GitHub | https://github.com/pamleft/pamleft.github.io.git |
Viewport: width=device-width, initial-scale=1