Compare two version numbers version1 and version2.If version1 > version2 return 1; if version1 < version2 return -1;otherwise return 0. You may assume ...
分类:
其他好文 时间:
2019-11-11 09:28:41
阅读次数:
84
个数据文件包含下列数据,5个家庭没有汽车(编码为0),20个家庭有一辆汽车(编码唯1),10个家庭拥有两辆汽车(编码为2)指出下列哪种统计量适用于描述该数据并计算出统计量的值。(A) A拥有汽车数的众数 B.拥有汽车数的中位数 C.拥有汽车数的方差 D.变异系数 2.为了生成某个给定变量的总和。应该 ...
分类:
其他好文 时间:
2019-11-10 22:40:20
阅读次数:
119
A1.一个数据文件包含下列数据,5个家庭没有汽车(编码为0);20个家庭拥有一辆汽车(编码为1);10个家庭拥有两辆车(编码为2)。指出下列哪种统计量适用于描述该数据并计算出该统计量的值: A. 拥有汽车数的众数 B. 拥有汽车数的中位数 C. 拥有汽车数的方差 D.变异系数 B2.为了生成某个给定 ...
分类:
其他好文 时间:
2019-11-10 19:06:29
阅读次数:
149
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai ...
分类:
其他好文 时间:
2019-11-10 17:34:22
阅读次数:
104
一、knn的原理 K-近邻算法采用测量不同特征值之间的距离方法进行分类。 问题是求某点的最近 K 个点。求两点间距离公式,此外还可能需要增加权重 优点:精度高、对异常值不敏感、无数据输入假定。 缺点:时间复杂度高、空间复杂度高。 1、当样本不平衡时,比如一个类的样本容量很大,其他类的样本容量很小,输 ...
分类:
其他好文 时间:
2019-11-10 15:30:55
阅读次数:
198
Algorithm 给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度。不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成。 [Remove Duplicates from Sorted Array]( https: ...
分类:
其他好文 时间:
2019-11-10 15:29:41
阅读次数:
73
求两个链表的交点。给个LC的截图作例子, 两种思路,一个是需要求出两个链表各自的长度,当两者不想等的时候,需要先遍历长的链表,使得其剩下的长度要跟短的链表长度相等,再去找两者的交点。如图所示就是需要先让B移动到node.value = 0的那个节点,再遍历A和B,看看交点在哪里。 时间O(n) 空间 ...
分类:
其他好文 时间:
2019-11-10 10:23:41
阅读次数:
87
Map map=new HashMap(); map.put("1", "one"); map.put("2","two"); map.put("3", "three"); map.put("4", "four"); map.put("5", "five"); map.put("6", "six") ...
分类:
编程语言 时间:
2019-11-09 22:10:47
阅读次数:
80
D. Bad Luck Island The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random in ...
分类:
其他好文 时间:
2019-11-09 21:59:21
阅读次数:
85
Pathfinding is a task of finding a route between two points. It often appears in many problems. For example, in a GPS navigation software where a driv ...
分类:
其他好文 时间:
2019-11-09 12:09:09
阅读次数:
107