<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[xyzchenzd的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/xyzchenzd</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; xyzchenzd]]></copyright><item><title><![CDATA[LeetCode Word Ladder]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/46042277</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/46042277</guid><author>xyzchenzd</author><pubDate>Wed, 27 May 2015 09:31:05 +0800</pubDate><description><![CDATA[题目
Given two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from
beginWord to endWord, such that: 

Only one letter can be changed at a timeEa]]></description><category></category></item><item><title><![CDATA[LeetCode Valid Palindrome]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45741687</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45741687</guid><author>xyzchenzd</author><pubDate>Fri, 15 May 2015 10:47:11 +0800</pubDate><description><![CDATA[题目
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is no]]></description><category></category></item><item><title><![CDATA[LeetCode Binary Tree Maximum Path Sum]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45559593</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45559593</guid><author>xyzchenzd</author><pubDate>Thu, 07 May 2015 13:20:22 +0800</pubDate><description><![CDATA[题目
Given a binary tree, find the maximum path sum. 
The path may start and end at any node in the tree. 
For example:
Given the below binary tree, 
       1
      / \
     2   3



Return 6. ]]></description><category></category></item><item><title><![CDATA[LeetCode Best Time to Buy and Sell Stock III]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45534513</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45534513</guid><author>xyzchenzd</author><pubDate>Wed, 06 May 2015 13:13:15 +0800</pubDate><description><![CDATA[题目
Say you have an array for which the ith element is the price of a given stock on day
i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
Note:
You may]]></description><category></category></item><item><title><![CDATA[LeetCode Best Time to Buy and Sell Stock II]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45479381</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45479381</guid><author>xyzchenzd</author><pubDate>Mon, 04 May 2015 13:12:47 +0800</pubDate><description><![CDATA[题目
Say you have an array for which the ith element is the price of a given stock on day
i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy]]></description><category></category></item><item><title><![CDATA[LeetCode Best Time to Buy and Sell Stock]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45479347</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45479347</guid><author>xyzchenzd</author><pubDate>Mon, 04 May 2015 13:06:20 +0800</pubDate><description><![CDATA[题目
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 and sell one share of the stoc]]></description><category></category></item><item><title><![CDATA[LeetCode Triangle]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45243339</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45243339</guid><author>xyzchenzd</author><pubDate>Fri, 24 Apr 2015 10:42:49 +0800</pubDate><description><![CDATA[题目
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle

[
     [2],
    [3,4],
  ]]></description><category></category></item><item><title><![CDATA[LeetCode Pascal's Triangle II]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45167409</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45167409</guid><author>xyzchenzd</author><pubDate>Tue, 21 Apr 2015 10:46:13 +0800</pubDate><description><![CDATA[题目
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1]. 
Note:
Could you optimize your algorithm to use only O(k) extra space?


与上一题相似，不过]]></description><category></category></item><item><title><![CDATA[LeetCode Pascal's Triangle]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45167295</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45167295</guid><author>xyzchenzd</author><pubDate>Tue, 21 Apr 2015 10:38:21 +0800</pubDate><description><![CDATA[题目
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return 
[
     [1],
    [1,1],
   [1,2,1],
  [1,3,3,1],
 [1,4,6,4,1]
]



C(N,i)的展开，简单地按层递推，逐]]></description><category></category></item><item><title><![CDATA[LeetCode Populating Next Right Pointers in Each Node II]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45073793</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45073793</guid><author>xyzchenzd</author><pubDate>Thu, 16 Apr 2015 12:58:58 +0800</pubDate><description><![CDATA[题目
Follow up for problem "Populating Next Right Pointers in Each Node".
What if the given tree could be any binary tree? Would your previous solution still work?
Note: 

You may only use constant]]></description><category></category></item><item><title><![CDATA[PAT A 1099. Build A Binary Search Tree (30)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/45008165</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/45008165</guid><author>xyzchenzd</author><pubDate>Sun, 12 Apr 2015 10:47:28 +0800</pubDate><description><![CDATA[题目
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:
The left subtree of a node contains only nodes with keys less than the node's key.
The righ]]></description><category></category></item><item><title><![CDATA[PAT A 1098. Insertion or Heap Sort (25)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/44917543</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/44917543</guid><author>xyzchenzd</author><pubDate>Tue, 07 Apr 2015 11:03:18 +0800</pubDate><description><![CDATA[题目
According to Wikipedia:
Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input d]]></description><category></category></item><item><title><![CDATA[PAT A 1097. Deduplication on a Linked List (25)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/44828933</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/44828933</guid><author>xyzchenzd</author><pubDate>Thu, 02 Apr 2015 10:39:10 +0800</pubDate><description><![CDATA[题目
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value ]]></description><category></category></item><item><title><![CDATA[PAT A 1096. Consecutive Factors (20)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/44805787</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/44805787</guid><author>xyzchenzd</author><pubDate>Wed, 01 Apr 2015 13:47:52 +0800</pubDate><description><![CDATA[题目
Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three consecutive numbers. Now gi]]></description><category></category></item><item><title><![CDATA[PAT A 1095. Cars on Campus (30)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/44537543</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/44537543</guid><author>xyzchenzd</author><pubDate>Sun, 22 Mar 2015 14:38:07 +0800</pubDate><description><![CDATA[题目
Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, y]]></description><category></category></item><item><title><![CDATA[PAT A 1094. The Largest Generation (25)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/44461989</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/44461989</guid><author>xyzchenzd</author><pubDate>Thu, 19 Mar 2015 18:20:38 +0800</pubDate><description><![CDATA[题目
A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the largest population.
In]]></description><category></category></item><item><title><![CDATA[PAT A 1093. Count PAT's (25)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/44342057</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/44342057</guid><author>xyzchenzd</author><pubDate>Tue, 17 Mar 2015 15:12:24 +0800</pubDate><description><![CDATA[题目
The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and the 6th characters.
]]></description><category></category></item><item><title><![CDATA[PAT A 1092. To Buy or Not to Buy (20)]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/44341635</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/44341635</guid><author>xyzchenzd</author><pubDate>Tue, 17 Mar 2015 14:48:24 +0800</pubDate><description><![CDATA[题目
Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only]]></description><category></category></item><item><title><![CDATA[LeetCode Populating Next Right Pointers in Each Node]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/43701105</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/43701105</guid><author>xyzchenzd</author><pubDate>Tue, 10 Feb 2015 11:34:45 +0800</pubDate><description><![CDATA[题目
Given a binary tree 
    struct TreeLinkNode {
      TreeLinkNode *left;
      TreeLinkNode *right;
      TreeLinkNode *next;
    }


Populate each next pointer to point to its next right node.]]></description><category></category></item><item><title><![CDATA[LeetCode Distinct Subsequences]]></title><link>https://blog.youkuaiyun.com/xyzchenzd/article/details/43669135</link><guid>https://blog.youkuaiyun.com/xyzchenzd/article/details/43669135</guid><author>xyzchenzd</author><pubDate>Mon, 09 Feb 2015 12:20:33 +0800</pubDate><description><![CDATA[题目
iven a string S and a string T, count the number of distinct subsequences of
T in S. 
A subsequence of a string is a new string which is formed from the original string by deleting some (can be ]]></description><category></category></item></channel></rss>