You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-12-31 20:11:16
阅读次数:
231
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-12-31 11:23:10
阅读次数:
154
这个题目与java里的BigInteger实现有些类似,可以参考其源码。
题目:
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is a...
分类:
其他好文 时间:
2014-12-29 21:24:42
阅读次数:
190
一:简介以及学习的途径
(1)吉布斯采样(Gibbs Sampling)及相关算法 (学习向Gibbs sampling, EM, MCMC算法 等的好地方)
1) 推荐大家读Bishop的Pattern Recognition and Machine Learning,讲的很清楚,偏理论一些;
2) 读artificial Intelligence,2、3版...
分类:
其他好文 时间:
2014-12-27 21:48:39
阅读次数:
304
Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授。PDF笔记下载(Academia.edu)SummaryIndependent $$P(A\cap B)=P(A)\cdot ...
分类:
其他好文 时间:
2014-12-27 06:40:49
阅读次数:
296
Given an array with positive and negative integers. Re-range it to interleaving with positive and negative integers.NoteYou are not necessary to keep ...
分类:
其他好文 时间:
2014-12-27 01:26:58
阅读次数:
421
题目:Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.代码...
分类:
编程语言 时间:
2014-12-27 00:14:19
阅读次数:
332
关于逻辑移位、算术移位可參见迅雷深大笔试题部分。的一道题。曾经看到C++标准上说,移位运算符(>)出界时的行为并不确定:The behavior is undefined if the right operand is negative, orgreater than or equal to the...
分类:
编程语言 时间:
2014-12-26 20:17:42
阅读次数:
241
之前写了两篇文章一个是KNN算法的C++串行实现,另一个是CUDA计算向量的欧氏距离。那么这篇文章就可以说是前两篇文章的一个简单的整合。在看这篇文章之前可以先阅读前两篇文章。
一、生成数据集
现在需要生成一个N个D维的数据,没在一组数据都有一个类标,这个类标根据第一维的正负来进行标识样本数据的类标:Positive and Negative。
#!/usr/bin/python
i...
分类:
编程语言 时间:
2014-12-26 16:40:41
阅读次数:
200
题目描述:
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down ...
分类:
其他好文 时间:
2014-12-26 11:12:15
阅读次数:
117