上一页 1 ··· 161 162 163 164 165 166 167 168 169 ··· 273 下一页
摘要: Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: Note: 这个题目本质上是一个数学题,需要细心观察才可 阅读全文
posted @ 2018-04-06 12:12 bonelee 阅读(193) 评论(2) 推荐(0)
摘要: 结果: [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]] 本质上是递归降维求解。 组合问题C(n, m)降维为C(n-1,m-1),而第一位可以: 选择1, 不选择1选择2, 不选择1不选择2选择3。。。。 if choose 1: xxx else: 阅读全文
posted @ 2018-04-05 19:07 bonelee 阅读(706) 评论(0) 推荐(0)
摘要: | 类循环排列 # tree DFS def loop_permutation(arr, depth, path, result): if depth == len(arr): result.append(list(path)) return for n in arr: path.append(n) 阅读全文
posted @ 2018-04-05 11:16 bonelee 阅读(818) 评论(0) 推荐(0)
摘要: 最近在做dns tunnel检测,发现了一堆类似这样的域名:c-6rtwjumjzx7877x24uwjkjwjshjx78x2eywzx78yjx2ehtr.g00.medicinenet.com 都是以g00为子域名,前面一堆随机字符!专门查了下: 从 https://www.reddit.co 阅读全文
posted @ 2018-04-04 12:17 bonelee 阅读(747) 评论(0) 推荐(0)
摘要: A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents 阅读全文
posted @ 2018-04-03 23:36 bonelee 阅读(287) 评论(1) 推荐(0)
摘要: Apriori算法与实例 R. Agrawal 和 R. Srikant于1994年在文献【2】中提出了Apriori算法,该算法的描述如下: 下面是一个具体的例子,最开始数据库里有4条交易,{A、C、D},{B、C、E},{A、B、C、E},{B、E},使用min_support=2作为支持度阈值 阅读全文
posted @ 2018-04-03 14:31 bonelee 阅读(10627) 评论(0) 推荐(0)
摘要: 涉及到tree的题目无非是遍历,三种遍历你要非常熟悉,本题目是后序遍历,你自己在头脑中自底向上模拟tree的遍历就知道怎么求解了!这个题目是谷歌面试遇到的,,,不过它要求的是找出所有的路径! 也可以在迭代每一个node的时候,记录下其diameter,ans就是所有node diameter最大值: 阅读全文
posted @ 2018-04-02 23:20 bonelee 阅读(330) 评论(1) 推荐(0)
摘要: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1 Example 2 Note: Your a 阅读全文
posted @ 2018-04-02 22:24 bonelee 阅读(248) 评论(0) 推荐(0)
摘要: DBSCAN方法及应用 1.DBSCAN密度聚类简介 DBSCAN 算法是一种基于密度的聚类算法: 1.聚类的时候不需要预先指定簇的个数 2.最终的簇的个数不确定DBSCAN算法将数据点分为三类: 1.核心点:在半径Eps内含有超过MinPts数目的点。 2.边界点:在半径Eps内点的数量小于Min 阅读全文
posted @ 2018-04-02 12:06 bonelee 阅读(44636) 评论(0) 推荐(4)
摘要: Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the ave 阅读全文
posted @ 2018-04-01 23:37 bonelee 阅读(217) 评论(0) 推荐(0)
上一页 1 ··· 161 162 163 164 165 166 167 168 169 ··· 273 下一页