<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[line02的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/line02</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; line02]]></copyright><item><title><![CDATA[第十九周：课后习题8.8]]></title><link>https://blog.csdn.net/line02/article/details/74276808</link><guid>https://blog.csdn.net/line02/article/details/74276808</guid><author>line02</author><pubDate>Mon, 03 Jul 2017 22:27:48 +0800</pubDate><description><![CDATA[解： 
    对于任意一个3SAT实例： 
    若其中某个子句中包含了同一个文字多次，则可以将这些相同的文字合并为一次； 
    若某个变量同时包含了true和false，则该变量可以去掉。 
    因此，在每个子句中添加一些没用的辅助变量，这样就可以将每个子句中包含的文字数目扩充到四个。 
    即将3SAT实例转化成了一个EXACT 4SAT问题。 
    这就通过将3SAT归约到]]></description><category></category></item><item><title><![CDATA[第十八周：[Leetcode]98. Validate Binary Search Tree]]></title><link>https://blog.csdn.net/line02/article/details/73860825</link><guid>https://blog.csdn.net/line02/article/details/73860825</guid><author>line02</author><pubDate>Wed, 28 Jun 2017 18:14:08 +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. 
The r]]></description><category></category></item><item><title><![CDATA[第十八周：[Leetcode]111. Minimum Depth of Binary Tree]]></title><link>https://blog.csdn.net/line02/article/details/73859992</link><guid>https://blog.csdn.net/line02/article/details/73859992</guid><author>line02</author><pubDate>Wed, 28 Jun 2017 18:10:43 +0800</pubDate><description><![CDATA[Given a binary tree, find its minimum depth. 
The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.和求最大距离不一样，因为是求到叶子节点的最小距离，需要区分左右子树有可能为空的情况]]></description><category></category></item><item><title><![CDATA[第十八周：[Leetcode]104. Maximum Depth of Binary Tree]]></title><link>https://blog.csdn.net/line02/article/details/73858060</link><guid>https://blog.csdn.net/line02/article/details/73858060</guid><author>line02</author><pubDate>Wed, 28 Jun 2017 18:04:24 +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.dfs进行递归。class Solution {
public:
    int]]></description><category></category></item><item><title><![CDATA[第十八周：[Leetcode]240. Search a 2D Matrix II]]></title><link>https://blog.csdn.net/line02/article/details/73851812</link><guid>https://blog.csdn.net/line02/article/details/73851812</guid><author>line02</author><pubDate>Wed, 28 Jun 2017 17:37:02 +0800</pubDate><description><![CDATA[Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: 
Integers in each row are sorted in ascending from left to right. 
Integers in each]]></description><category></category></item><item><title><![CDATA[第十八周：[Leetcode]74. Search a 2D Matrix]]></title><link>https://blog.csdn.net/line02/article/details/73851091</link><guid>https://blog.csdn.net/line02/article/details/73851091</guid><author>line02</author><pubDate>Wed, 28 Jun 2017 17:32:47 +0800</pubDate><description><![CDATA[Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: 
Integers in each row are sorted from left to right. 
The first integer of each row]]></description><category></category></item><item><title><![CDATA[第十七周：[Sicily]机考模拟题1000-1006]]></title><link>https://blog.csdn.net/line02/article/details/73399169</link><guid>https://blog.csdn.net/line02/article/details/73399169</guid><author>line02</author><pubDate>Sun, 18 Jun 2017 00:33:23 +0800</pubDate><description><![CDATA[1000.函数求值：直接暴力模拟即可。class Solution {
public:
    int F(int k, int n) {
      int ans[15][15] = {0};
      int i,j,kk,cur;
      for(i = 0;i <= n;i++)
          ans[0][i] = i;
      for(i = 1;i <= k;i++)]]></description><category></category></item><item><title><![CDATA[第十六周：[Sicily]1321. Robot]]></title><link>https://blog.csdn.net/line02/article/details/72887823</link><guid>https://blog.csdn.net/line02/article/details/72887823</guid><author>line02</author><pubDate>Tue, 06 Jun 2017 21:40:40 +0800</pubDate><description><![CDATA[Description 
Karell Incorporated has designed a new exploration robot that has the ability to explore new terrains, this new robot can move in all kinds of terrain, it only needs more fuel to move in r]]></description><category></category></item><item><title><![CDATA[第十五周：[Sicily]1504. Slim Span]]></title><link>https://blog.csdn.net/line02/article/details/72862366</link><guid>https://blog.csdn.net/line02/article/details/72862366</guid><author>line02</author><pubDate>Sun, 04 Jun 2017 22:54:51 +0800</pubDate><description><![CDATA[就是求给出的图中，所有生成树中最大权值边与最小权值边的差的最小值。首先将所有边按照权值升序排序，然后从权值最小的边开始用kruskal法求最小生成树，因为以该边开始的最小生成树，得到的最大权值边与最小权值边的差值肯定是以该边开始的生成树里最小的。因此就转换成了以不同边开始求最小生成树的问题。然后继续求以权值第二小的边开始的最小生成树。。。一直求到以权值第m-（n-1）大的边开始的最小生成树（因为最小]]></description><category></category></item><item><title><![CDATA[第十四周：[LeetCode]10. Regular Expression Matching]]></title><link>https://blog.csdn.net/line02/article/details/72854567</link><guid>https://blog.csdn.net/line02/article/details/72854567</guid><author>line02</author><pubDate>Sat, 03 Jun 2017 21:22:39 +0800</pubDate><description><![CDATA[Implement regular expression matching with support for ‘.’ and ‘*’.‘.’ Matches any single character. 
‘*’ Matches zero or more of the preceding element.The matching should cover the entire input string]]></description><category></category></item><item><title><![CDATA[第十三周：[Sicily]1423. 魔王bug的2色定理]]></title><link>https://blog.csdn.net/line02/article/details/72512495</link><guid>https://blog.csdn.net/line02/article/details/72512495</guid><author>line02</author><pubDate>Thu, 18 May 2017 23:41:35 +0800</pubDate><description><![CDATA[Description 
背景： 
传说中魔王bug被杀时留下了一股神秘的力量，但是同时也留下了一个具难的题目，如果你能解答这个 
具难的题目，你就能获得bug魔王留下的神秘力量…… 
题目描述： 
魔王bug的难题来自于它自创的2色定理，魔王bug坚信：天地万物，有阴必有阳，有正必有负，有黑必有白， 
有邪恶的魔王必有正义的天使 >_< ….. 
魔王bug留下了一幅N个点M个边的图，图中有些点已]]></description><category></category></item><item><title><![CDATA[第十二周：[Sicily]1402. Panic Room]]></title><link>https://blog.csdn.net/line02/article/details/72354422</link><guid>https://blog.csdn.net/line02/article/details/72354422</guid><author>line02</author><pubDate>Tue, 16 May 2017 23:28:23 +0800</pubDate><description><![CDATA[Description 
You are the lead programmer for the Securitron 9042, the latest and greatest in home security software from 
Jellern Inc. (Motto: We secure your stuff so YOU can’t even get to it). The sof]]></description><category></category></item><item><title><![CDATA[第十一周：[Leetcode]139. Word Break]]></title><link>https://blog.csdn.net/line02/article/details/71374861</link><guid>https://blog.csdn.net/line02/article/details/71374861</guid><author>line02</author><pubDate>Sun, 07 May 2017 22:09:15 +0800</pubDate><description><![CDATA[Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. You may assum]]></description><category></category></item><item><title><![CDATA[第十一周：[Leetcode]474. Ones and Zeroes]]></title><link>https://blog.csdn.net/line02/article/details/71374681</link><guid>https://blog.csdn.net/line02/article/details/71374681</guid><author>line02</author><pubDate>Sun, 07 May 2017 21:55:00 +0800</pubDate><description><![CDATA[In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. 
For now, suppose you are a dominator of m 0s and n 1s respectively. On the other h]]></description><category></category></item><item><title><![CDATA[第十周：[Leetcode]486. Predict the Winner]]></title><link>https://blog.csdn.net/line02/article/details/71056911</link><guid>https://blog.csdn.net/line02/article/details/71056911</guid><author>line02</author><pubDate>Mon, 01 May 2017 17:19:25 +0800</pubDate><description><![CDATA[Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a player picks a]]></description><category></category></item><item><title><![CDATA[第九周：[Leetcode]494. Target Sum]]></title><link>https://blog.csdn.net/line02/article/details/70667360</link><guid>https://blog.csdn.net/line02/article/details/70667360</guid><author>line02</author><pubDate>Tue, 25 Apr 2017 00:26:54 +0800</pubDate><description><![CDATA[You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol. 
Find out how many]]></description><category></category></item><item><title><![CDATA[第九周：[Leetcode]523. Continuous Subarray Sum]]></title><link>https://blog.csdn.net/line02/article/details/70667302</link><guid>https://blog.csdn.net/line02/article/details/70667302</guid><author>line02</author><pubDate>Tue, 25 Apr 2017 00:15:32 +0800</pubDate><description><![CDATA[Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of k, that is, sums up to n]]></description><category></category></item><item><title><![CDATA[第九周：[Leetcode]93. Restore IP Addresses]]></title><link>https://blog.csdn.net/line02/article/details/70667050</link><guid>https://blog.csdn.net/line02/article/details/70667050</guid><author>line02</author><pubDate>Mon, 24 Apr 2017 23:43:38 +0800</pubDate><description><![CDATA[Given a string containing only digits, restore it by returning all possible valid IP address combinations. 
For example: 
Given “25525511135”, 
return [“255.255.11.135”, “255.255.111.35”]. (Order does]]></description><category></category></item><item><title><![CDATA[第八周：[Leetcode]300. Longest Increasing Subsequence]]></title><link>https://blog.csdn.net/line02/article/details/70185123</link><guid>https://blog.csdn.net/line02/article/details/70185123</guid><author>line02</author><pubDate>Sat, 15 Apr 2017 16:16:31 +0800</pubDate><description><![CDATA[Given an unsorted array of integers, find the length of longest increasing subsequence. 
For example, 
Given [10, 9, 2, 5, 3, 7, 101, 18], 
The longest increasing subsequence is [2, 3, 7, 101], therefo]]></description><category></category></item><item><title><![CDATA[第八周：[Leetcode]516. Longest Palindromic Subsequence]]></title><link>https://blog.csdn.net/line02/article/details/70185087</link><guid>https://blog.csdn.net/line02/article/details/70185087</guid><author>line02</author><pubDate>Sat, 15 Apr 2017 16:11:21 +0800</pubDate><description><![CDATA[Given a string s, find the longest palindromic subsequence’s length in s. You may assume that the maximum length of s is 1000. 
Example 1: 
Input: 
“bbbab” 
Output: 
4 
One possible longest palindromic]]></description><category></category></item></channel></rss>