过年晚上无聊,233333333 题解: BST树的中序遍历是有序的,遍历过程中,记录前一个值,然后和当前值比较,来更新最小的minimum distance 注意python参数传递时候,像list这些object是传引用,单独int的数是传值的 ...
分类:
其他好文 时间:
2018-02-15 21:57:00
阅读次数:
196
无监督学习 1、简介 无监督学习 是一种对不含标记的数据建立模型的机器学习范式。最常见的无监督学习方法是 聚类 ,就是讲无标记的数据分成几种集群,这些集群通常是根据某种相似度指标进行的,如欧氏距离(Euclidean distance),常用领域有:数据挖掘、医学影像、股票市场分析、计算机视觉、市场 ...
分类:
其他好文 时间:
2018-02-14 10:35:37
阅读次数:
388
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree.Exam... ...
分类:
其他好文 时间:
2018-02-12 23:41:33
阅读次数:
652
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa ...
分类:
其他好文 时间:
2018-02-12 21:00:58
阅读次数:
235
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa ...
分类:
其他好文 时间:
2018-02-11 23:38:11
阅读次数:
162
看了这本书的第一个算法—k-近邻算法,这个算法总体构造思想是比较简单的,在ACM当中的话就对应了kd树这种结构。首先需要给定训练集,然后给出测试数据,求出训练集中与测试数据最相近的k个数据,根据这k个数据的属性来确定我们测试数据的属性。 书上的例子是给了四个点以及这四个点的标签,分别是A,A,B,B ...
分类:
编程语言 时间:
2018-02-10 15:02:33
阅读次数:
99
Description Give a tree with n vertices,each edge has a length(positive integer less than $1001$ ). Define $dist(u,v)=$The min distance between node $ ...
分类:
其他好文 时间:
2018-02-05 10:34:11
阅读次数:
114
题目描述 Vasiliy has a car and he wants to get from home to the post office. The distance which he needs to pass equals to ddkilometers. Vasiliy's car is ...
分类:
其他好文 时间:
2018-01-31 18:31:40
阅读次数:
143
Opencv分水岭算法——watershed自动图像分割用法 OpenCV距离变换distanceTransform应用 图像分割在图像处理中占有重要地位,也是图像识别的基础。通常需要在进行图像分割算法前找到轮廓或分割线,因此传统的分割算法主要集中在边缘检测、阈值处理等。 ...
分类:
编程语言 时间:
2018-01-28 20:02:00
阅读次数:
184
72. Edit Distance 72. Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operat ...
分类:
其他好文 时间:
2018-01-28 13:49:08
阅读次数:
122