最近工作转向k8s,自己比较满意,之前很久就有兴趣,也看完了一本kubernetes up and running, 但并没有进一步深入研究。这次参与公司的k8s cluster升级项目,收获良多,算是正式入门了,看来深入的掌握知识果然还是得learning by doing,压力动力具备,目标导向,才能高效的学习。后续也会推出k8s, istio系列blog。
3Sum^1, Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
The solution set must not contain duplicate triplets.
我们在初学shell时,经常会纠结于参数分割,是否需要加引号,单引号还是双引号,有时单引号工作,有时又得双引号。稍不注意,就会得到很unexpect的结果。而经常也会感叹于变量引用的灵活:$PATH $(date) `ls`,让人眼花缭乱。更别提在我们用grep,sed时,那让人目眩的一大串转义字符了,WTF is that?
1 2 3 4 5
# search in vim /([0-9]\{3\}) [0-9]\{3\}-[0-9]\{4\} # sed to process sed 's/\([0-9]\{2\}\)\/\([0-9]\{2\}\)\/\([0-9]\{4\}\ )$/\3-\1-\2/' distros.txt