会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
影翕
博客园
首页
新随笔
联系
订阅
管理
2016年8月14日
最大熵
摘要: 熵: 表示随机变量不确定性的度量。 只依赖于随机变量X的分布,与其取值无关 0<=H(X)<=log(n),当随机变量X符合均匀分布时,熵最大 最大熵: 最大熵可理解为满足现有约束条件的情况下,其余不确定的信息默认为等可能的
阅读全文
posted @ 2016-08-14 19:10 影翕
阅读(221)
评论(0)
推荐(0)
2016年8月10日
线性代数-捡起来系列
摘要: 1.行列式 二阶行列式= a * d - b * c 三阶行列式= a11*a22*a33+a12*a23*a31+a13*a21*a32 -a31*a22*a13-a32*a23*a11-a33*a21*a12 //三条线减三条线 1,2,3 全排列:1,2,3 1,3,2 2,1,3 2,3,1
阅读全文
posted @ 2016-08-10 22:21 影翕
阅读(277)
评论(0)
推荐(0)
2015年9月9日
不同的路径 II
摘要: class Solution {public: /** * @param obstacleGrid: A list of lists of integers * @return: An integer */ int uniquePathsWithObstacle...
阅读全文
posted @ 2015-09-09 19:13 影翕
阅读(208)
评论(0)
推荐(0)
2015年9月8日
不同的路径
摘要: class Solution {public: /** * @param n, m: positive integer (1 <= n ,m <= 100) * @return an integer */ int uniquePaths(int m, int n)...
阅读全文
posted @ 2015-09-08 10:15 影翕
阅读(120)
评论(0)
推荐(0)
2015年9月5日
两个字符串是变位词
摘要: class Solution {public: /** * @param s: The first string * @param b: The second string * @return true or false */ bool anagram(s...
阅读全文
posted @ 2015-09-05 23:22 影翕
阅读(158)
评论(0)
推荐(0)
x的平方根
摘要: class Solution {public: /** * @param x: An integer * @return: The sqrt of x */ int getResult(long start, long end, long target){ ...
阅读全文
posted @ 2015-09-05 10:20 影翕
阅读(196)
评论(0)
推荐(0)
2015年9月2日
O(1)检测2的幂次
摘要: class Solution {public: /* * @param n: An integer * @return: True or false */ bool checkPowerOf2(int n) { // write your code ...
阅读全文
posted @ 2015-09-02 15:39 影翕
阅读(143)
评论(0)
推荐(0)
Fizz Buzz
摘要: 1 class Solution { 2 public: 3 /** 4 * param n: As description. 5 * return: A list of strings. 6 */ 7 vector fizzBuzz(int n) {...
阅读全文
posted @ 2015-09-02 15:31 影翕
阅读(233)
评论(0)
推荐(0)
2015年8月17日
20 Valid Parentheses(匹配括号)
摘要: 题目意思:判断一个字符串(){}[]是否符合思路:用栈ps:实习一个多月了,代码也刷不动了,状态真不是一般的差class Solution {public: bool isValid(string s) { if(s==""||s.size()%2==1) ...
阅读全文
posted @ 2015-08-17 16:30 影翕
阅读(167)
评论(0)
推荐(0)
2015年8月11日
python细节
摘要: 1.assert 断言语句,可判断一句话真假,若为假会抛出AssertionError。 eg. assert 1==1 assert 1==2则AssertionError 2.单引号双引号 f1=open('xxx')和f1=open("xxx")效果相同 s = "aa" 与 ...
阅读全文
posted @ 2015-08-11 13:10 影翕
阅读(122)
评论(0)
推荐(0)
下一页
公告