<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LCIS Archives - Huahua&#039;s Tech Road</title>
	<atom:link href="https://zxi.mytechroad.com/blog/tag/lcis/feed/" rel="self" type="application/rss+xml" />
	<link>https://zxi.mytechroad.com/blog/tag/lcis/</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jul 2018 01:32:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.8</generator>

<image>
	<url>https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/cropped-photo-32x32.jpg</url>
	<title>LCIS Archives - Huahua&#039;s Tech Road</title>
	<link>https://zxi.mytechroad.com/blog/tag/lcis/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>花花酱 LeetCode 674. Longest Continuous Increasing Subsequence</title>
		<link>https://zxi.mytechroad.com/blog/dynamic-programming/leetcode-674-longest-continuous-increasing-subsequence/</link>
					<comments>https://zxi.mytechroad.com/blog/dynamic-programming/leetcode-674-longest-continuous-increasing-subsequence/#comments</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 10 Sep 2017 15:24:29 +0000</pubDate>
				<category><![CDATA[Dynamic Programming]]></category>
		<category><![CDATA[LC]]></category>
		<category><![CDATA[LCIS]]></category>
		<category><![CDATA[LCS]]></category>
		<guid isPermaLink="false">http://zxi.mytechroad.com/blog/?p=199</guid>

					<description><![CDATA[<p>Problem: Given an unsorted array of integers, find the length of longest continuous increasing subsequence. Example 1: [crayon-663babe3d9365016026323/] Explanation: The longest continuous increasing subsequence is [1,3,5], its&#8230;</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/dynamic-programming/leetcode-674-longest-continuous-increasing-subsequence/">花花酱 LeetCode 674. Longest Continuous Increasing Subsequence</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><iframe width="500" height="375" src="https://www.youtube.com/embed/I_bxq4nm2sk?feature=oembed" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></p>
<p><strong>Problem:</strong></p>
<div class="question-description">
<p>Given an unsorted array of integers, find the length of longest <code>continuous</code> increasing subsequence.</p>
<p><b>Example 1:</b></p><pre class="crayon-plain-tag">Input: [1,3,5,4,7]
Output: 3</pre><p>Explanation: The longest continuous increasing subsequence is [1,3,5], its length is 3. Even though [1,3,5,7] is also an increasing subsequence, it&#8217;s not a continuous one where 5 and 7 are separated by 4.</p>
<p><b>Example 2:</b></p><pre class="crayon-plain-tag">Input: [2,2,2,2,2]
Output: 1</pre><p>Explanation: The longest continuous increasing subsequence is [2], its length is 1.</p>
<p><b>Note:</b> Length of the array will not exceed 10,000.</p>
</div>
<div id="interviewed-div"><strong>Idea:</strong></div>
<div></div>
<div>Dynamic Programming</div>
<div></div>
<div></div>
<div><a href="http://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/674-ep47.png"><img class="alignnone size-full wp-image-200" src="http://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/674-ep47.png" alt="" width="960" height="540" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/674-ep47.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/674-ep47-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/674-ep47-768x432.png 768w, https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/674-ep47-624x351.png 624w" sizes="(max-width: 960px) 100vw, 960px" /></a></div>
<div></div>
<div><strong>Solution:</strong></div>
<div>
<pre class="crayon-plain-tag">// Author: Huahua
class Solution {
public:
    int findLengthOfLCIS(vector&lt;int&gt;&amp; nums) {
        if (nums.empty()) return 0;
        int cur = 1;
        int ans = 1;
        for (int i = 1; i &lt; nums.size(); ++i) {
            if (nums[i] &gt; nums[i-1]) {
                ++cur;
                ans = max(ans, cur);
            } else {
                cur = 1;
            }            
        }
        return ans;
    }
};</pre><br />
&nbsp;</p>
</div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/dynamic-programming/leetcode-674-longest-continuous-increasing-subsequence/">花花酱 LeetCode 674. Longest Continuous Increasing Subsequence</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zxi.mytechroad.com/blog/dynamic-programming/leetcode-674-longest-continuous-increasing-subsequence/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
