Github IO
摘要: 338. 比特位计数 给定一个非负整数 num。对于 0 ≤ i ≤ num 范围中的每个数字 i ,计算其二进制数中的 1 的数目并将它们作为数组返回。 示例 1: 输入: 2 输出: [0,1,1] 示例 2: 输入: 5 输出: [0,1,1,2,1,2] 解答 很明显,根据前面的结果得出后面 阅读全文
posted @ 2021-03-03 13:34 laiyk 阅读(154) 评论(0) 推荐(0)
摘要: 准备材料 4G以上空白U盘一只 Ubuntu 光盘镜像文件.iso, 我的版本是Ubuntu 20.04 LTS 安装系统 https://ubuntu.com/tutorials/install-ubuntu-desktop#8-select-your-location 将ios文件烧录入USB 阅读全文
posted @ 2021-03-02 20:17 laiyk 阅读(75) 评论(0) 推荐(0)
摘要: Multiple Access 理想的多址协议(MA): 单源使用吞吐量为R N源使用吞吐量为R/N 信道划分协议 TDMA 原理:将时间划分为frame,又将frame划分为slot,在固定的slot内传输 FDMA 原理:将信道按频率划分为多个独立信道 CDMA TDMA和CDMA都消除了碰撞, 阅读全文
posted @ 2021-03-01 21:28 laiyk 阅读(270) 评论(0) 推荐(0)
摘要: 区域和检索 - 数组不可变 给定一个整数数组 nums,求出数组从索引 i 到 j(i ≤ j)范围内元素的总和,包含 i、j 两点。 实现 NumArray 类: NumArray(int[] nums) 使用数组 nums 初始化对象 int sumRange(int i, int j) 返回数 阅读全文
posted @ 2021-03-01 09:05 laiyk 阅读(57) 评论(0) 推荐(0)
摘要: Git Concept: Version Control System Components Local version repository: contains commits named by their SHA-1 hash working copy: what you can see in 阅读全文
posted @ 2021-02-28 15:41 laiyk 阅读(64) 评论(0) 推荐(0)
摘要: How To Ask a Question The Smart Way 原博文:http://www.catb.org/~esr/faqs/smart-questions.html 我这篇博文总结了什么 剔除了作者关于笨笨的提问者的不必要的抱怨,留下了对于提问平台、方法、格式、技巧的精华。 正文 提 阅读全文
posted @ 2021-02-28 13:20 laiyk 阅读(85) 评论(0) 推荐(0)
摘要: What's Special With Haskell Lazy V.S strict Haskell is a lazy language, which means that no computation takes place unless it is forced to take place 阅读全文
posted @ 2021-02-28 00:29 laiyk 阅读(69) 评论(0) 推荐(0)
摘要: 力扣395 https://leetcode-cn.com/problems/longest-substring-with-at-least-k-repeating-characters/ 至少有K个重复字符的最长子串 给你一个字符串 s 和一个整数 k ,请你找出 s 中的最长子串, 要求该子串中 阅读全文
posted @ 2021-02-27 14:18 laiyk 阅读(76) 评论(0) 推荐(0)
摘要: 位运算基础 set bit: mask |= (1 << puzzle[i]) submask : `submask |= (submask - 1) & mask 位置掩码 https://leetcode-cn.com/problems/subsets/ 先来看78题 子集 给你一个整数数组nu 阅读全文
posted @ 2021-02-26 16:58 laiyk 阅读(154) 评论(0) 推荐(0)
摘要: 基本使用小技巧 Basic Mode Shift-D:删除整行内容但不删除行 Visual Mode C-V: 块模式,适合配合Shift-I注释掉一大段 Shift-V: 行模式,适合配合d和p剪切代码 配置文件 按加载顺序:(后面的设置覆盖前面的) /etc/vim/vimrc /etc/vim 阅读全文
posted @ 2021-02-26 01:19 laiyk 阅读(90) 评论(0) 推荐(0)