摘要:
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each va 阅读全文
摘要:
Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, a 阅读全文
摘要:
1、信息熵 一些概念 p(x):分类结果x的概率,即分类结果为x的数据量/总数据量信息:l(x) = -log2(p(x))信息熵:信息的期望值 -(p(x1)l(x1) + p(x2)l(x2) + ……) 计算信息熵 1 def calcShannonEnt(dataset): 2 numEnt 阅读全文