leetcode 第一天 2017年12月24日 第一次刷leetcode真的是好慢啊,三道题用了三个小时,而且都是简单题。 数组 1.(674)Longest Continuous Increasing Subsequence JAVA Python 2.(283)Move Zeroes JAVA ...
分类:
其他好文 时间:
2017-12-26 00:46:22
阅读次数:
145
语言模型 p(S) 就是语言模型,即用来计算一个句子 S 概率的模型。 那么,如何计算呢?最简单、直接的方法是计数后做除法,即最大似然估计(Maximum Likelihood Estimate,MLE),如下: 其中,count(w1,w2,…,wi?1,wi) 表示词序列(w1,w2,…,wi? ...
分类:
编程语言 时间:
2017-12-25 15:05:33
阅读次数:
207
public class Solution{ public static List subsequenceOfString(String s) { if (s == null || s.length() == 0) { return new LinkedList(); } Set set = new... ...
分类:
其他好文 时间:
2017-12-25 11:32:04
阅读次数:
105
We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra ...
分类:
其他好文 时间:
2017-12-25 11:30:46
阅读次数:
109
/// <summary> /// 将本地文件上传到指定的服务器(HttpWebRequest方法) /// </summary> /// <param name="address">文件上传到的服务器</param> /// <param name="fileNamePath">要上传的本地文件( ...
听说你的模型损失是NaN 有时候,模型跑着跑着,损失就莫名变NaN了。不过,经验告诉我们,大部分NaN主要是因为除数是0或者传给log的数值不大于0。下面说说是log出NaN的几种常见解决方法。 毕竟, 计算机的是无法表示所有实数的,尽管有些函数得出的结果只能无限近似0,但是由于计算机精度问题,最后 ...
分类:
其他好文 时间:
2017-12-22 23:54:15
阅读次数:
217
开发中经常遇到: 前端遇到Uncaught RangeError: Maximum call stack size exceeded错误 后台遇到java.lang.OutOfMemoryError: PermGen space问题 都是因为对象类型(节点类型)转为字符串类型(或者json类型)引起 ...
分类:
其他好文 时间:
2017-12-22 19:44:32
阅读次数:
100
1)lettcode题目: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: ...
分类:
其他好文 时间:
2017-12-20 03:40:57
阅读次数:
216
报错信息: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$ConnectionLossException ...
分类:
其他好文 时间:
2017-12-19 19:51:00
阅读次数:
195
Max Sum of Subarray with size k, 相当于Easy难度,我说用一个sum array存sum,然后做减法就行。中国小哥说让优化空间,于是说可以只用两个数。 The question asks for three non-overlapping intervals wit ...
分类:
移动开发 时间:
2017-12-19 15:29:11
阅读次数:
205