- 博客(9)
- 收藏
- 关注
原创 awk grep sed
Arrays in Bash参考 https://www.thegeekstuff.com/2010/06/bash-array-tutorial/ https://coderinme.com/basic-bash-concepts-part-9-arrays-with-solved-hackerrank-problems/array=($(cat))echo ${array[@...
2018-04-23 09:51:20
145
原创 cut 命令 in BASH
1. 取出2nd 和7th 字母 cut -c2,72. 取出2nd - 7th字母cut -c 2-7也可以cut -c -7cut -c 2-3. 按tab分割cut -d $'\t' -f1-34. head / tail 命令head -n 22 | tail -n 115. tr 命令tr "()" "...
2018-04-22 14:02:13
374
原创 常见bash命令
1. 显示字符串Echo “String” 2. for 循环for((i = 1; i < 100; i += 2))do echo $idone参考 https://www.garron.me/en/articles/bash-for-loop-examples.html3. 接受输入 readread nameecho "Welco...
2018-04-20 08:21:03
350
原创 phone interview 的基本流程
clarification简单重复题目 input 类型, int float, 正负, noneoutput (一般不必, corner case的话, 可以问问) 想到一些corner case, 问问面试者think out load边举例 边讲采用什么算法 想一些corner case (可以问面试者)用一个例子验证一遍 test 如果有多种情况, 比如没有返回, ret
2018-01-26 07:37:28
1214
原创 Leetcode 常见bug总结
647. Substring AnagramsGiven a string s and a non-empty string p, find all the start indices of p’s anagrams in s. LintCode没有验证 len(s) 的情况
2018-01-10 00:44:34
875
原创 periodical data 在机器学习中的feature engineering
如果数据中出现显著的周期性,比如 月,日 (年倒是例外吧)或者 角度之类的 应该处理成循环的数据类型. (也不一定总work)
2018-01-03 09:09:29
157
原创 动态规划类问题小结
bottom up 类:转换行进方向如果采用 top down 可能会需要考虑两个corner的情况cur[0] = dp[0] + triangle[i][0]for j in range(1, i): cur[j] = min(dp[j-1], dp[j]) + triangle[i][j]cur[i] = dp[i-1] + triangle[i][i]如果采用bottom up,
2018-01-02 09:54:05
220
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人