上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 273 下一页
摘要: DBSCAN方法及应用 1.DBSCAN密度聚类简介 DBSCAN 算法是一种基于密度的聚类算法: 1.聚类的时候不需要预先指定簇的个数 2.最终的簇的个数不确定DBSCAN算法将数据点分为三类: 1.核心点:在半径Eps内含有超过MinPts数目的点。 2.边界点:在半径Eps内点的数量小于Min 阅读全文
posted @ 2018-04-02 12:06 bonelee 阅读(44614) 评论(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 阅读(204) 评论(0) 推荐(0)
摘要: >>> a=[[0]*3 for i in range(3)]>>> a[[0, 0, 0], [0, 0, 0], [0, 0, 0]]>>> a[1][1]=121>>> a[[0, 0, 0], [0, 121, 0], [0, 0, 0]]>>> a[0][0]=11>>> a[[11, 0 阅读全文
posted @ 2018-04-01 23:37 bonelee 阅读(671) 评论(0) 推荐(0)
摘要: Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h 阅读全文
posted @ 2018-04-01 22:46 bonelee 阅读(231) 评论(0) 推荐(0)
摘要: 参数解释: (1)iterable指定要排序的list或者iterable,不用多说; (2)cmp为函数,指定排序时进行比较的函数,可以指定一个函数或者lambda函数,如: students为类对象的list,没个成员有三个域,用sorted进行比较时可以自己定cmp函数,例如这里要通过比较第三 阅读全文
posted @ 2018-04-01 22:26 bonelee 阅读(25838) 评论(0) 推荐(1)
摘要: Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals 阅读全文
posted @ 2018-04-01 22:16 bonelee 阅读(283) 评论(0) 推荐(0)
摘要: Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t 阅读全文
posted @ 2018-04-01 21:07 bonelee 阅读(225) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. click to show more hints. 精简下代码: 递归解: dfs 记得程序员面试金典里专门提过! 阅读全文
posted @ 2018-04-01 16:46 bonelee 阅读(163) 评论(0) 推荐(0)
摘要: Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Sil 阅读全文
posted @ 2018-04-01 12:29 bonelee 阅读(211) 评论(0) 推荐(0)
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
posted @ 2018-04-01 10:36 bonelee 阅读(140) 评论(0) 推荐(0)
上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 273 下一页