<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/angelazy</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; angelazy]]></copyright><item><title><![CDATA[Matlab生成归一化直方图]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/51029079</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/51029079</guid><author>angelazy</author><pubDate>Thu, 31 Mar 2016 18:23:53 +0800</pubDate><description><![CDATA[使用matlab的函数histogram可以直接得到数据的直方图，但这并不是归一化的直方图。使用如下代码可以得到归一化的直方图x = randn(10000, 1);
numOfBins = 100;
[histFreq, histXout] = hist(x, numOfBins);
binWidth = histXout(2)-histXout(1);
figure;
bar(histXout,]]></description><category></category></item><item><title><![CDATA[Matlab读写TIFF格式文件]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/50465058</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/50465058</guid><author>angelazy</author><pubDate>Fri, 04 Mar 2016 21:41:48 +0800</pubDate><description><![CDATA[t = Tiff(‘myfile2.tif’,’w’); 
tagstruct.ImageLength = size(nmf,1) 
tagstruct.ImageWidth = size(nmf,2) 
tagstruct.Photometric = 1 
tagstruct.BitsPerSample = 32 
tagstruct.SamplesPerPixel = 4 
tagstruct]]></description><category></category></item><item><title><![CDATA[《禅与摩托车维修艺术》书摘]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/49836483</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/49836483</guid><author>angelazy</author><pubDate>Sat, 14 Nov 2015 16:08:52 +0800</pubDate><description><![CDATA[1.  骑摩托车旅游和其他的方式完全不同。坐在汽车里，你只是被局限在一个小空间之内，因为已经习惯了，你意识不到从车窗向外看风景和看电视差不多。你只个被动的观众，景物只能呆板地从窗外飞驰而过。骑摩托车可就不同了。它没有什么车窗玻璃在面前阻挡你视野，你会感到自己和大自然紧密地结合在了一起。你就处在景致之中，而不再是观众，你能感受到那种身临其境的震撼。脚下飞驰而过的是实实在在的水泥公路，和你走过的土地没有]]></description><category></category></item><item><title><![CDATA[LeetCode(55) Search Insert Position]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48687617</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48687617</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 21:00:23 +0800</pubDate><description><![CDATA[题目描述Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.H]]></description><category></category></item><item><title><![CDATA[LeetCode (54) Valid Anagram]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48685931</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48685931</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 19:42:19 +0800</pubDate><description><![CDATA[题目描述Given two strings s and t, write a function to determine if t is an anagram of s.For example, 
s = “anagram”, t = “nagaram”, return true. 
s = “rat”, t = “car”, return false.Note: 
You may assume t]]></description><category></category></item><item><title><![CDATA[LeetCode(53) Climbing Stairs (剑指Offer->跳台阶、变态跳台阶)]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48685885</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48685885</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 19:38:44 +0800</pubDate><description><![CDATA[Climbing Stairs (跳台阶)题目描述You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?本题对应了《剑指offe]]></description><category></category></item><item><title><![CDATA[LeetCode(52) Power of Two]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48685415</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48685415</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 19:21:16 +0800</pubDate><description><![CDATA[题目描述Given an integer, write a function to determine if it is a power of two.判断一个数是否是2的指数。题目解答本题很简单可以通过位运算进行判断。首先如果一个数为负，则肯定不为2的指数，直接返回false；对于正数可以判断该数字二进制表达时1的个数，如果1的个数为只有一个则为2的指数，否则不为2的指数。class Soluti]]></description><category></category></item><item><title><![CDATA[LeetCode(51) Symmetric Tree]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48684295</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48684295</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 18:58:18 +0800</pubDate><description><![CDATA[题目描述Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric:But the following is not:判断一棵二叉树是否对称。解题思路根据题目要求，可以认为是树的层序遍历的]]></description><category></category></item><item><title><![CDATA[LeetCode(50) Binary Tree Inorder Traversal 中序遍历]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48684199</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48684199</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 18:50:53 +0800</pubDate><description><![CDATA[题目描述Given a binary tree, return the inorder traversal of its nodes’ values.For example: 
Given binary tree {1,#,2,3},return [1,3,2].解题思路之前在二叉树的先序遍历中已经介绍了二叉树遍历的思路了，这里直接上代码。递归解法/**
 * Definition for a bi]]></description><category></category></item><item><title><![CDATA[LeetCode(49) Populating Next Right Pointers in Each Node I II]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48683927</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48683927</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 18:45:56 +0800</pubDate><description><![CDATA[Populating Next Right Pointers in Each Node I题目描述Given a binary treestruct TreeLinkNode {
   TreeLinkNode *left;
   TreeLinkNode *right;
   TreeLinkNode *next;
}Populate each next pointer to point to i]]></description><category></category></item><item><title><![CDATA[LeetCode(48) Binary Tree Preorder Traversal]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48683907</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48683907</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 18:24:14 +0800</pubDate><description><![CDATA[题目描述Given a binary tree, return the preorder traversal of its nodes’ values.For example: 
Given binary tree {1,#,2,3}, 
 
return [1,2,3].本题要求对二叉树进行先序遍历，所谓先序遍历：根-左-右，先遍历根结点，再遍历左子树，最后遍历右子树。递归求解二叉树的遍历最简单的]]></description><category></category></item><item><title><![CDATA[LeetCode(47) Invert Binary Tree]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48683755</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48683755</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 18:11:22 +0800</pubDate><description><![CDATA[题目描述Invert a binary tree. 
 => 题目要求将二叉树的左右子树进行逆转。解题思路根据题目的要求可以进行一层一层的逆转，也就是交换结点的左右子树。将未处理的元素放入栈中，本题的关键在于对于元素的入栈顺序进行控制。/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *]]></description><category></category></item><item><title><![CDATA[LeetCode(46) Lowest Common Ancestor of a Binary （Search） Tree]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48681621</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48681621</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 16:11:22 +0800</pubDate><description><![CDATA[Lowest Common Ancestor of a Binary Search Tree题目描述Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia:]]></description><category></category></item><item><title><![CDATA[LeetCode(45) Simplify Path]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48680773</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48680773</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 15:20:54 +0800</pubDate><description><![CDATA[题目描述Given an absolute path for a file (Unix-style), simplify it.For example, 
path = “/home/”, => “/home” 
path = “/a/./b/../../c/”, => “/c”本题要求对给定的Unix路径进行简化，关键点在于理解Unix路径的规则以及对一些边界条件要加以考虑。Unix路径规则：]]></description><category></category></item><item><title><![CDATA[LeetCode(44) Best Time to Buy and Sell Stock I II]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48677825</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48677825</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 14:55:59 +0800</pubDate><description><![CDATA[Best Time to Buy and Sell Stock I题目描述Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one a]]></description><category></category></item><item><title><![CDATA[LeetCode(43) Add Digits]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48677547</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48677547</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 11:22:10 +0800</pubDate><description><![CDATA[题目描述Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digi]]></description><category></category></item><item><title><![CDATA[LeetCode(42) Maximum Depth of Binary Tree]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48677191</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48677191</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 10:59:19 +0800</pubDate><description><![CDATA[题目描述Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.题目要求计算一棵二叉树的高度。本题最简单的解法是递归计算左右子树的高度，并在左]]></description><category></category></item><item><title><![CDATA[LeetCode(41) Single Number I 和 II]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48676983</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48676983</guid><author>angelazy</author><pubDate>Wed, 23 Sep 2015 10:48:26 +0800</pubDate><description><![CDATA[题目描述Given an array of integers, every element appears twice except for one. Find that single one.如果一个给定数组中除了一个元素其他所有元素均出现了两次，这里让我们找到只出现了一次的元素。解题方法这里需要使用位运算来解决本题。我们知道异或运算有这样的结果a^a = 0，所以对数组中所有元素进行异或运算时，]]></description><category></category></item><item><title><![CDATA[LeetCode(40) Median of Two Sorted Arrays (两排序数组中位数)]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48661833</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48661833</guid><author>angelazy</author><pubDate>Tue, 22 Sep 2015 21:18:45 +0800</pubDate><description><![CDATA[题目描述There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).题目要求寻找两个已排序数组的中位数解题代码本题我使用]]></description><category></category></item><item><title><![CDATA[LeetCode (39) Ugly Number I II (丑数)]]></title><link>https://blog.youkuaiyun.com/angelazy/article/details/48661725</link><guid>https://blog.youkuaiyun.com/angelazy/article/details/48661725</guid><author>angelazy</author><pubDate>Tue, 22 Sep 2015 21:12:32 +0800</pubDate><description><![CDATA[Ugly Number I 和 Ugly Number II]]></description><category></category></item></channel></rss>