Linux 环境配置
用户与 sudo 用户直接用root也行,但一般还是新建用户,免密的正确配置法:sudo vim /etc/sudoers.d/ark,添加ark ALL=(ALL:ALL) NOPASSWD:ALL。 不要在/etc/sudoers里加,那里不起作用。 常用命令 …(内容略,后续可补充)… 详见主文档索引。
用户与 sudo 用户直接用root也行,但一般还是新建用户,免密的正确配置法:sudo vim /etc/sudoers.d/ark,添加ark ALL=(ALL:ALL) NOPASSWD:ALL。 不要在/etc/sudoers里加,那里不起作用。 常用命令 …(内容略,后续可补充)… 详见主文档索引。
Bash Git 批量处理相关文件 move or remove them before you merge, use this to get related files: git xxx 2>&1|grep -E '^\s'|cut -f2-|xargs -I {} echo "{}" 进程/端口 no ps需要apt install procps。 ps axu ...
Grokking the Coding Interview: Patterns for Coding Questions See grokking-1. 6. Pattern In-place Reversal of a LinkedList Reverse a LinkedList (easy) Given the head of a Singly LinkedList, reve...
Grokking the Coding Interview: Patterns for Coding Questions See grokking-1. 5. Pattern Cyclic Sort 这个cyclic sort,需要一点预备知识。cyclic sort条件是,数组元素必须是1到n,虽然乱序,但我们可以确定这个n长的数组里一定是1到n这n个数字,不会有别的数字。如果要对这...
Grokking the Coding Interview: Patterns for Coding Questions See grokking-1. 4. Pattern: Merge Intervals Merge Intervals (medium) 挺简单的题,尤其是我对这种merge interval的题有一个印象,就是“反着比正着简单”。所以很容易就想到了,这题应该反向...
Grokking the Coding Interview: Patterns for Coding Questions See grokking-1. 3. Pattern: Fast & Slow pointers LinkedList Cycle (easy) 题目描述很反人类,但其实就是给你一个链表(只有head指针),让你判断是否有环。进阶是只使用O(1)的空间,也...
Grokking the Coding Interview: Patterns for Coding Questions See grokking-1. 2. Pattern: Two Pointers Pair with Target Sum (easy) – LeetCode 这题第一感觉是map或者排序后二分查找,双指针是个什么操作? 双指针自然得用在排序后的数组上,头尾各一...
Grokking the Coding Interview: Patterns for Coding Questions 课程原地址 题目目录与答案 Python版——完整题目目录,包含challenge。 题目目录与答案 C++版(附题目OJ的地址)——推荐用OJ测试自己的算法,但是这个repo里基本没有challenge题目。 1. Pattern: Sliding Window...
推荐站点: http://xiaoxumeng.com/category/leetcode/ https://codetop.cc/ https://codetop.cc/ 微软 227. 基本计算器 II 2012/03/22-23 这道题,用栈是最快速的,可以现场推理思路,完成80%应该不是问题。 但这种表达式,很可能会被考变种,比如加了括号,加了UnaryOp,甚至更难。 括...
C & Go 对照表:https://hyperpolyglot.org/c vim等使用方法快查:https://hyperpolyglot.org/text-mode-editors