<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[xansus的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/xansus</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; xansus]]></copyright><item><title><![CDATA[Remove Element]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/29650909</link><guid>https://blog.youkuaiyun.com/xansus/article/details/29650909</guid><author>xansus</author><pubDate>Mon, 09 Jun 2014 22:53:18 +0800</pubDate><description><![CDATA[Given an array and a value, remove all instances of that value in place and return the new length.

The order of elements can be changed. It doesn't matter what you leave beyond the new length.

c]]></description><category></category></item><item><title><![CDATA[Remove Duplicates from Sorted Array]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/28601467</link><guid>https://blog.youkuaiyun.com/xansus/article/details/28601467</guid><author>xansus</author><pubDate>Thu, 05 Jun 2014 11:06:20 +0800</pubDate><description><![CDATA[Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.

Do not allocate extra space for another array, you must do this in place with]]></description><category></category></item><item><title><![CDATA[Reverse Nodes in k-Group]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/28274611</link><guid>https://blog.youkuaiyun.com/xansus/article/details/28274611</guid><author>xansus</author><pubDate>Tue, 03 Jun 2014 17:43:13 +0800</pubDate><description><![CDATA[Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.

If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is]]></description><category></category></item><item><title><![CDATA[Merge k Sorted Lists]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/27862751</link><guid>https://blog.youkuaiyun.com/xansus/article/details/27862751</guid><author>xansus</author><pubDate>Sat, 31 May 2014 23:21:32 +0800</pubDate><description><![CDATA[Merge k sorted
 linked lists and return it as one sorted list. Analyze and describe its complexity.
class Solution {
public:
    struct cmp{
        bool operator()(ListNode* node1, ListNode* node2)]]></description><category></category></item><item><title><![CDATA[Generate Parentheses]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/27357847</link><guid>https://blog.youkuaiyun.com/xansus/article/details/27357847</guid><author>xansus</author><pubDate>Wed, 28 May 2014 17:46:34 +0800</pubDate><description><![CDATA[Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

For example, given n = 3, a solution set is:

"((()))", "(()())", "(())()", "()(())", "()()]]></description><category></category></item><item><title><![CDATA[Letter Combinations of a Phone Number]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/27116101</link><guid>https://blog.youkuaiyun.com/xansus/article/details/27116101</guid><author>xansus</author><pubDate>Mon, 26 May 2014 22:38:31 +0800</pubDate><description><![CDATA[Given a digit string, return all possible letter combinations that the number could represent.

A mapping of digit to letters (just like on the telephone buttons) is given below.]]></description><category></category></item><item><title><![CDATA[4Sum]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/26626951</link><guid>https://blog.youkuaiyun.com/xansus/article/details/26626951</guid><author>xansus</author><pubDate>Thu, 22 May 2014 22:38:08 +0800</pubDate><description><![CDATA[Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d =
 target? Find all unique quadruplets in the array which gives the sum of target.

Note:


Element]]></description><category></category></item><item><title><![CDATA[Longest Common Prefix]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/26464243</link><guid>https://blog.youkuaiyun.com/xansus/article/details/26464243</guid><author>xansus</author><pubDate>Wed, 21 May 2014 13:04:48 +0800</pubDate><description><![CDATA[Write a function to find the longest common prefix string amongst an array of strings.
class Solution {
public:
    string longestCommonPrefix(vector &strs) {
        if (strs.size() == 0)  
        ]]></description><category></category></item><item><title><![CDATA[Container With Most Water]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/26283903</link><guid>https://blog.youkuaiyun.com/xansus/article/details/26283903</guid><author>xansus</author><pubDate>Mon, 19 May 2014 21:24:54 +0800</pubDate><description><![CDATA[Given n non-negative integers a1, a2,
 ..., an, where each represents a point at coordinate (i, ai). n vertical
 lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
 0). Fin]]></description><category></category></item><item><title><![CDATA[Regular Expression Matching]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25922183</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25922183</guid><author>xansus</author><pubDate>Fri, 16 May 2014 15:46:45 +0800</pubDate><description><![CDATA[Implement regular expression matching with support for '.' and '*'.]]></description><category></category></item><item><title><![CDATA[3Sum Closest]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25830009</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25830009</guid><author>xansus</author><pubDate>Wed, 14 May 2014 20:28:45 +0800</pubDate><description><![CDATA[Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have
 exact]]></description><category></category></item><item><title><![CDATA[Roman to Integer]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25789049</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25789049</guid><author>xansus</author><pubDate>Wed, 14 May 2014 16:21:07 +0800</pubDate><description><![CDATA[Given a roman numeral, convert it to an integer.

Input is guaranteed to be within the range from 1 to 3999.class Solution {
public:
    int romanToInt(string s) {
         mapmyMap;
        myMap[']]></description><category></category></item><item><title><![CDATA[Swap Nodes in Pairs]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25809295</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25809295</guid><author>xansus</author><pubDate>Wed, 14 May 2014 16:20:03 +0800</pubDate><description><![CDATA[Given a linked list, swap every two adjacent nodes and return its head.

For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.

Your algorithm should use only constant space. Y]]></description><category></category></item><item><title><![CDATA[Integer to Roman]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25741295</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25741295</guid><author>xansus</author><pubDate>Tue, 13 May 2014 21:36:08 +0800</pubDate><description><![CDATA[Given an integer, convert it to a roman numeral.

Input is guaranteed to be within the range from 1 to 3999.]]></description><category></category></item><item><title><![CDATA[String to Integer (atoi)]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25405883</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25405883</guid><author>xansus</author><pubDate>Fri, 09 May 2014 16:20:35 +0800</pubDate><description><![CDATA[Implement atoi to convert a string to an integer.

Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca]]></description><category></category></item><item><title><![CDATA[Median of Two Sorted Arrays]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25326833</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25326833</guid><author>xansus</author><pubDate>Thu, 08 May 2014 22:43:25 +0800</pubDate><description><![CDATA[There are two sorted arrays A and B 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)).


class Solution {
public:
    ]]></description><category></category></item><item><title><![CDATA[3Sum]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25250301</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25250301</guid><author>xansus</author><pubDate>Wed, 07 May 2014 23:19:00 +0800</pubDate><description><![CDATA[Given an array S of n integers, are there elements a, b, c in S such that a + b + c =
 0? Find all unique triplets in the array which gives the sum of zero.

Note:


Elements in a triplet (a,b,c]]></description><category></category></item><item><title><![CDATA[Palindrome Number]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/25161753</link><guid>https://blog.youkuaiyun.com/xansus/article/details/25161753</guid><author>xansus</author><pubDate>Tue, 06 May 2014 22:11:17 +0800</pubDate><description><![CDATA[Determine whether an integer is a palindrome. Do this without extra space.]]></description><category></category></item><item><title><![CDATA[Longest Palindromic Substring]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/24969911</link><guid>https://blog.youkuaiyun.com/xansus/article/details/24969911</guid><author>xansus</author><pubDate>Mon, 05 May 2014 22:53:00 +0800</pubDate><description><![CDATA[Given a string S,
 find the longest palindromic substring in S.
 You may assume that the maximum length of S is
 1000, and there exists one unique longest palindromic substring.
O(n)]]></description><category></category></item><item><title><![CDATA[Validate Binary Search Tree]]></title><link>https://blog.youkuaiyun.com/xansus/article/details/24803083</link><guid>https://blog.youkuaiyun.com/xansus/article/details/24803083</guid><author>xansus</author><pubDate>Wed, 30 Apr 2014 17:27:27 +0800</pubDate><description><![CDATA[Given a binary tree, determine if it is a valid binary search tree (BST).

Assume a BST is defined as follows:

The left subtree of a node contains only nodes with keys less than the node's key.Th]]></description><category></category></item></channel></rss>