LeeCode是一个有意思的编程网站,主要考察程序员的算法 第二题: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse o ...
分类:
其他好文 时间:
2017-12-30 22:40:29
阅读次数:
207
A. Rounding Vasya has a non-negative integer n. He wants to round it to nearest integer, which ends up with 0. If n already ends up with 0, Vasya cons ...
分类:
其他好文 时间:
2017-12-30 21:26:53
阅读次数:
197
本文介绍朴素贝叶斯算法如何对文本进行分类。比如,每个用户的购物评论就是一篇文本,识别出这篇文本属于正向评论还是负面评论 就是分类的过程,而类别就是:{正面评论,负面评论}。正面评论为Positive,用标识符'+'表示;负面评论为Negative,用标识符'-'表示。 一,分类目标 寻找文本的某些特 ...
分类:
其他好文 时间:
2017-12-29 20:56:36
阅读次数:
267
Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thi ...
分类:
其他好文 时间:
2017-12-27 14:29:30
阅读次数:
113
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo ...
分类:
其他好文 时间:
2017-12-27 14:09:50
阅读次数:
140
同步自我的知乎专栏文章:https://zhuanlan.zhihu.com/p/32135185 从Slerp说起 ICLR'2017的投稿里,有一篇很有意思但被拒掉的投稿《Sampling Generative Networks》 by Tom White。文章比较松散地讲了一些在latent ...
分类:
其他好文 时间:
2017-12-26 21:56:57
阅读次数:
463
1、三元表达式: value= true-expr if condition else false-expr 例如:a='positive' if 3>0 else 'negative' 2、用列表推导式来取代map和filter 3、函数式编程 能接收其他函数作为参数的函数,被称为高阶函数(hig ...
分类:
编程语言 时间:
2017-12-26 18:02:05
阅读次数:
214
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 ...
分类:
其他好文 时间:
2017-12-24 14:46:34
阅读次数:
162
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y ...
分类:
其他好文 时间:
2017-12-20 14:57:50
阅读次数:
138
Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their ...
分类:
其他好文 时间:
2017-12-20 13:52:43
阅读次数:
202