个人博客:https://luxialan.com

摘要: The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a... 阅读全文
posted @ 2015-01-15 09:10 luxialan 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.The a... 阅读全文
posted @ 2015-01-03 10:57 luxialan 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.You m... 阅读全文
posted @ 2015-01-03 10:23 luxialan 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Ubantu版本:14.04Matlab版本:2014a安装Matlab2014a1.下载好Mathworks.Matlab.R2014a.Unix.rar:http://pan.baidu.com/s/1c0GSxhQ解压缩至Mathworks.Matlab.R2014a.Unix.iso,再解压... 阅读全文
posted @ 2014-12-29 22:25 luxialan 阅读(1235) 评论(0) 推荐(0) 编辑
摘要: 进制的转换是个十分基础的问题,很多字符串变换的过程本质上都可以归结为进制的转换首先是十进制转换为二进制//十进制转换为二制的源码 #include #include#includeusing namespace std; void ten2two(int n){ vector vec; wh... 阅读全文
posted @ 2014-12-25 21:45 luxialan 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Hadoop和传统大数据处理方式的差别 本文摘自:Markboo新浪博客说道Hadoop,就要先讲到大数据。上个世纪,好远。。。九十年代后,开始,数据开始大量的产生,总之到了快没法弄的程度了。比如说之前90年代,一个1G的硬盘,传输速度4.4M每秒,读取全盘大概需要5分钟。现在呢,一个1T的硬盘,传... 阅读全文
posted @ 2014-12-25 17:36 luxialan 阅读(269) 评论(0) 推荐(0) 编辑
摘要: Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.八皇后问题拖了好久才解决,用的是回溯法的思路,可以用非... 阅读全文
posted @ 2014-12-24 14:17 luxialan 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 什么是特征向量,特征值,矩阵分解[1. 特征的数学意义] 我们先考察一种线性变化,例如x,y坐标系的椭圆方程可以写为x^2/a^2+y^2/b^2=1,那么坐标系关于原点做旋转以后,椭圆方程就要发生变换。我们可以把原坐标系的(x,y)乘以一个矩阵,得到一个新的(x',y')的表示形式,写为算子... 阅读全文
posted @ 2014-12-11 15:14 luxialan 阅读(424) 评论(0) 推荐(0) 编辑
摘要: Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1... 阅读全文
posted @ 2014-12-07 11:30 luxialan 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.这道题本质上是二分搜索... 阅读全文
posted @ 2014-12-07 10:49 luxialan 阅读(117) 评论(0) 推荐(0) 编辑