<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Katrina_Pan的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Krista_Pan</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Krista_Pan]]></copyright><item><title><![CDATA[证明NP问题（算法概论8.8）]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/75008481</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/75008481</guid><author>Krista_Pan</author><pubDate>Wed, 12 Jul 2017 12:31:44 +0800</pubDate><description><![CDATA[Description 
在精确的4SAT（EXACT 4SAT）问题中，输入为一组子句，每个子句都是恰好4个文字的析取，且每个变量最多在每个子句中出现一次。 
目标是求它的满足赋值——如果该赋值存在。证明精确的4SAT是NP完全问题。Proof： 
不难得到，书本中给出证明:3SAT问题是NP-完全的。 
可知，对于问题A,B。若A是NP-完全的，则当我们将A归约到B时就可以证明得到B也是NP-完]]></description><category></category></item><item><title><![CDATA[LeetCode 322. Coin Change]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/73086568</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/73086568</guid><author>Krista_Pan</author><pubDate>Mon, 12 Jun 2017 01:34:47 +0800</pubDate><description><![CDATA[322. Coin ChangeDescription 
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amou]]></description><category></category></item><item><title><![CDATA[LeetCode  279. Perfect Squares]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/73086260</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/73086260</guid><author>Krista_Pan</author><pubDate>Mon, 12 Jun 2017 01:28:24 +0800</pubDate><description><![CDATA[279. Perfect SquaresDescription 
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n.For example, given n = 12, return 3 because 12]]></description><category></category></item><item><title><![CDATA[LeetCode 338. Counting Bits]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/73085856</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/73085856</guid><author>Krista_Pan</author><pubDate>Mon, 12 Jun 2017 01:21:43 +0800</pubDate><description><![CDATA[338. Counting BitsDescription 
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an arr]]></description><category></category></item><item><title><![CDATA[LeetCode 17. Letter Combinations of a Phone Number]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676750</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676750</guid><author>Krista_Pan</author><pubDate>Wed, 24 May 2017 15:23:45 +0800</pubDate><description><![CDATA[17. Letter Combinations of a Phone NumberDescription 
 Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the tele]]></description><category></category></item><item><title><![CDATA[LeetCode 3. Longest Substring Without Repeating Characters]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676646</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676646</guid><author>Krista_Pan</author><pubDate>Wed, 24 May 2017 15:14:54 +0800</pubDate><description><![CDATA[3. Longest Substring Without Repeating CharactersDescription 
Given a string, find the length of the longest substring without repeating characters.Examples:Given “abcabcbb”, the answer is “abc”, which]]></description><category></category></item><item><title><![CDATA[LeetCode 28. Implement strStr()]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676540</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676540</guid><author>Krista_Pan</author><pubDate>Wed, 24 May 2017 15:06:38 +0800</pubDate><description><![CDATA[28. Implement strStr()Description 
Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Analysis 
这道题的意思就是实现一个strstr函数。 
这个函数的返回值是]]></description><category></category></item><item><title><![CDATA[LeetCode 38. Count and Say]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676462</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676462</guid><author>Krista_Pan</author><pubDate>Wed, 24 May 2017 15:00:04 +0800</pubDate><description><![CDATA[38. Count and SayDescription 
The count-and-say sequence is the sequence of integers beginning as follows: 
1, 11, 21, 1211, 111221, …1 is read off as “one 1” or 11. 
11 is read off as “two 1s” or 21.]]></description><category></category></item><item><title><![CDATA[LeetCode 14. Longest Common Prefix]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676358</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72676358</guid><author>Krista_Pan</author><pubDate>Wed, 24 May 2017 14:51:02 +0800</pubDate><description><![CDATA[14. Longest Common PrefixDescription 
Write a function to find the longest common prefix string amongst an array of strings.Analysis 
题目的意思是求所给字符串组中公有的最大子前缀。 
我的做法是首先假定建立一个变量index。 
index来确定最大前缀在第一个字符串]]></description><category></category></item><item><title><![CDATA[LeetCode 456. 132 Pattern]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72457001</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72457001</guid><author>Krista_Pan</author><pubDate>Thu, 18 May 2017 06:29:46 +0800</pubDate><description><![CDATA[456. 132 PatternDescription 
Given a sequence of n integers a1, a2, …, an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm that takes a list of n num]]></description><category></category></item><item><title><![CDATA[LeetCode 402. Remove K Digits]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72456997</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72456997</guid><author>Krista_Pan</author><pubDate>Thu, 18 May 2017 06:21:01 +0800</pubDate><description><![CDATA[402. Remove K DigitsDescription 
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.Note: 
The length of num is le]]></description><category></category></item><item><title><![CDATA[LeetCode 394. Decode String]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/72456995</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/72456995</guid><author>Krista_Pan</author><pubDate>Thu, 18 May 2017 06:12:05 +0800</pubDate><description><![CDATA[394. Decode StringDescription 
Given an encoded string, return it’s decoded string.The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly]]></description><category></category></item><item><title><![CDATA[LeetCode 517. Super Washing Machines]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71534272</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71534272</guid><author>Krista_Pan</author><pubDate>Wed, 10 May 2017 15:20:49 +0800</pubDate><description><![CDATA[517. Super Washing MachinesDescription 
You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty.For each move, you could choose any m (1 ≤ m ≤ n) washi]]></description><category></category></item><item><title><![CDATA[LeetCode 152. Maximum Product Subarray]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71531717</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71531717</guid><author>Krista_Pan</author><pubDate>Wed, 10 May 2017 15:10:05 +0800</pubDate><description><![CDATA[152. Maximum Product SubarrayDescription 
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4], 
the conti]]></description><category></category></item><item><title><![CDATA[LeetCode 343. Integer Break]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71526592</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71526592</guid><author>Krista_Pan</author><pubDate>Wed, 10 May 2017 14:50:22 +0800</pubDate><description><![CDATA[343. Integer BreakDescription 
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For]]></description><category></category></item><item><title><![CDATA[LeetCode 120. Triangle]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71525312</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71525312</guid><author>Krista_Pan</author><pubDate>Wed, 10 May 2017 14:39:09 +0800</pubDate><description><![CDATA[120. TriangleDescription 
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 
[]]></description><category></category></item><item><title><![CDATA[LeetCode 64. Minimum Path Sum]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71106071</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71106071</guid><author>Krista_Pan</author><pubDate>Wed, 03 May 2017 00:50:50 +0800</pubDate><description><![CDATA[64. Minimum Path SumDescription 
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only]]></description><category></category></item><item><title><![CDATA[LeetCode 91. Decode Ways]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71106051</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71106051</guid><author>Krista_Pan</author><pubDate>Wed, 03 May 2017 00:43:22 +0800</pubDate><description><![CDATA[91. Decode WaysDescription 
A message containing letters from A-Z is being encoded to numbers using the following mapping:‘A’ -> 1 
‘B’ -> 2 
… 
‘Z’ -> 26 
Given an encoded message containing digits, d]]></description><category></category></item><item><title><![CDATA[LeetCode 96. Unique Binary Search Trees]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71105644</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71105644</guid><author>Krista_Pan</author><pubDate>Wed, 03 May 2017 00:03:19 +0800</pubDate><description><![CDATA[96. Unique Binary Search TreesDescription 
Given n, how many structurally unique BST’s (binary search trees) that store values 1…n?For example, 
Given n = 3, there are a total of 5 unique BST’s.Analysi]]></description><category></category></item><item><title><![CDATA[LeetCode 303. Range Sum Query - Immutable]]></title><link>https://blog.youkuaiyun.com/Krista_Pan/article/details/71105529</link><guid>https://blog.youkuaiyun.com/Krista_Pan/article/details/71105529</guid><author>Krista_Pan</author><pubDate>Tue, 02 May 2017 23:54:12 +0800</pubDate><description><![CDATA[303. Range Sum Query - ImmutableDescription 
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example: 
Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0,]]></description><category></category></item></channel></rss>