<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[diting0371的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/diting0371</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; diting0371]]></copyright><item><title><![CDATA[《将博客搬至优快云》]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872051</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872051</guid><author>diting0371</author><pubDate>Thu, 13 Apr 2017 12:57:00 +0800</pubDate><description><![CDATA[《将博客搬至优快云》

转载于:https://www.cnblogs.com/GoFly/p/6703395.html]]></description><category></category></item><item><title><![CDATA[策略模式(Strategy Pattern)]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872049</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872049</guid><author>diting0371</author><pubDate>Sat, 13 Aug 2016 14:59:00 +0800</pubDate><description><![CDATA[策略模式(Strategy Pattern)

　　抛开晦涩的定义，首先看一个例子：
　　我们想要创建一个模拟鸭子的游戏，在这个游戏中，会有各种类型的鸭子，比如mallard duck,red head duck,rubber duck（除了rubber duck（橡皮鸭），看见这其余两种鸭子很好奇，于是查找相关图片，发现mallard duck是绿头鸭，red head ...]]></description><category></category></item><item><title><![CDATA[[Array]Game of Life]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872059</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872059</guid><author>diting0371</author><pubDate>Thu, 11 Aug 2016 13:30:00 +0800</pubDate><description><![CDATA[According to theWikipedia's article: "TheGame of Life, also known simply asLife, is a cellular automaton devised by the British mathematician John Horton Conway in 1970."
Given aboardwithm...]]></description><category></category></item><item><title><![CDATA[[Array]Find Minimum in Rotated Sorted Array]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872047</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872047</guid><author>diting0371</author><pubDate>Tue, 09 Aug 2016 20:23:00 +0800</pubDate><description><![CDATA[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 may assume no duplicate exists in the...]]></description><category></category></item><item><title><![CDATA[[Array]Combination Sum III]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872056</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872056</guid><author>diting0371</author><pubDate>Thu, 21 Jul 2016 13:00:00 +0800</pubDate><description><![CDATA[Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.
Example 1:
Input...]]></description><category></category></item><item><title><![CDATA[[Array]Combination Sum II]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872044</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872044</guid><author>diting0371</author><pubDate>Thu, 21 Jul 2016 12:58:00 +0800</pubDate><description><![CDATA[Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
Each number in C may only be used once in the comb...]]></description><category></category></item><item><title><![CDATA[[Array]Combination Sum]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872041</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872041</guid><author>diting0371</author><pubDate>Thu, 21 Jul 2016 12:56:00 +0800</pubDate><description><![CDATA[Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited n...]]></description><category></category></item><item><title><![CDATA[[Array]Minimum Size Subarray Sum]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872054</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872054</guid><author>diting0371</author><pubDate>Thu, 21 Jul 2016 08:59:00 +0800</pubDate><description><![CDATA[Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn’t one, return 0 instead.
For example, given the array [...]]></description><category></category></item><item><title><![CDATA[[Array]Find Peak Element]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872052</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872052</guid><author>diting0371</author><pubDate>Thu, 21 Jul 2016 08:43:00 +0800</pubDate><description><![CDATA[A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.
The array may contain multiple peaks, ...]]></description><category></category></item><item><title><![CDATA[[Array]3 Sum Closest]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872038</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872038</guid><author>diting0371</author><pubDate>Mon, 18 Jul 2016 08:32:00 +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 ...]]></description><category></category></item><item><title><![CDATA[[Array] Remove Duplicates from Sorted Array]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872050</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872050</guid><author>diting0371</author><pubDate>Fri, 15 Jul 2016 10:45:00 +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...]]></description><category></category></item><item><title><![CDATA[[Array]Pascal's Triangle II]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872048</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872048</guid><author>diting0371</author><pubDate>Fri, 15 Jul 2016 08:41:00 +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[[Array] Pascal's Triangle]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872046</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872046</guid><author>diting0371</author><pubDate>Fri, 15 Jul 2016 08:30:00 +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] 
] 
方法：正常模拟即可...]]></description><category></category></item><item><title><![CDATA[[Array] Best Time to Buy and Sell Stock]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872036</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872036</guid><author>diting0371</author><pubDate>Thu, 14 Jul 2016 09:07:00 +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 st...]]></description><category></category></item><item><title><![CDATA[[Array]Move Zeroes]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872042</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872042</guid><author>diting0371</author><pubDate>Wed, 13 Jul 2016 09:19:00 +0800</pubDate><description><![CDATA[Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements.
For example, given nums = [0, 1, 0, 3, 12], after calling ...]]></description><category></category></item><item><title><![CDATA[[Array]Majority Element]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872034</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872034</guid><author>diting0371</author><pubDate>Wed, 13 Jul 2016 08:55:00 +0800</pubDate><description><![CDATA[Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.
You may assume that the array is non-empty and the majority eleme...]]></description><category></category></item><item><title><![CDATA[[Array]Merge Sorted Array]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872040</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872040</guid><author>diting0371</author><pubDate>Sat, 09 Jul 2016 14:37:00 +0800</pubDate><description><![CDATA[Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note: 
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold...]]></description><category></category></item><item><title><![CDATA[[Array]Rotate Array]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872032</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872032</guid><author>diting0371</author><pubDate>Fri, 08 Jul 2016 12:47:00 +0800</pubDate><description><![CDATA[Rotate an array of n elements to the right by k steps. 
For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].
方法1：将k%size进行处理后将最后面k个插入到前面。
class Solutio...]]></description><category></category></item><item><title><![CDATA[[Array]Contains Duplicate]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872037</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872037</guid><author>diting0371</author><pubDate>Thu, 07 Jul 2016 23:36:00 +0800</pubDate><description><![CDATA[Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every ele...]]></description><category></category></item><item><title><![CDATA[[Array]Contains Duplicate II]]></title><link>https://blog.youkuaiyun.com/diting0371/article/details/101872035</link><guid>https://blog.youkuaiyun.com/diting0371/article/details/101872035</guid><author>diting0371</author><pubDate>Thu, 07 Jul 2016 13:05:00 +0800</pubDate><description><![CDATA[Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k.
利...]]></description><category></category></item></channel></rss>