- 博客(7)
- 收藏
- 关注
原创 Leetcode 326. Power of Three
原题:Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?分析:对于类似的题可以找到一个通用的解法,即假maxPower是32位整数中,3的最大次幂,
2016-05-19 14:15:39
251
原创 Leetcode 238. Product of Array Except Self
原题:Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].Solve it without division
2016-05-15 20:55:04
239
原创 leetcode 342 Power of four
原题:Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example:Given num = 16, return true. Given num = 5, return false.Follow up: Could you solve it
2016-05-07 14:40:54
261
转载 Mac 将mysql路径加入环境变量
1.打开终端,输入: cd ~会进入~文件夹2.然后输入:touch .bash_profile回车执行后,2.再输入:open -e .bash_profile会在TextEdit中打开这个文件(如果以前没有配置过环境变量,那么这应该是一个空白文档)。如果有内容,请在结束符前输入,如果没有内容,请直接输入如下语句:export PATH=${PAT
2015-10-13 11:39:24
301
原创 WikipediaExtractor 使用心得
WikipediaExtractor 是python下一款解析wikipedia dump的利器。根据官网的介绍,只需一行即可抽取wikipedia dump的主要内容:bzcat zhwiki-latest-pages-articles.xml.bz2 | python WikiExtractor.py -cb 250k -o extracted但是个人在mac下使用时发现以上命
2015-09-30 11:40:38
3312
原创 MATLAB使用笔记
9-22 bsxfun函数:X_norm = bsxfun(@minus, X, mu);相当于把矩阵X的每个元素分别减去mu的对应元素。值得注意的是,如果X和mu维数不同,程序会自动复制添加元素。
2015-09-22 22:15:43
474
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人