<?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>weekly contest Archives - Huahua&#039;s Tech Road</title>
	<atom:link href="https://zxi.mytechroad.com/blog/tag/weekly-contest/feed/" rel="self" type="application/rss+xml" />
	<link>https://zxi.mytechroad.com/blog/tag/weekly-contest/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2019 04:06:17 +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>weekly contest Archives - Huahua&#039;s Tech Road</title>
	<link>https://zxi.mytechroad.com/blog/tag/weekly-contest/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>花花酱 LeetCode Weekly Contest 137</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-137/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-137/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 19 May 2019 04:00:15 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[dp]]></category>
		<category><![CDATA[dynamic programming]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=5206</guid>

					<description><![CDATA[<p>1046.&#160;Last Stone Weight Solution: Simulation (priority_queue) Time complexity: O(nlogn)Space complexity: O(n) [crayon-6646c606c9b77892139901/] 1047. Remove All Adjacent Duplicates In String Solution: Stack / Deque Time complexity:&#8230;</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-137/">花花酱 LeetCode Weekly Contest 137</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2><strong>1046.&nbsp;Last Stone Weight</strong></h2>



<p>Solution: Simulation (priority_queue)</p>



<p>Time complexity: O(nlogn)<br>Space complexity: O(n)<br><br></p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua
class Solution {
public:
  int lastStoneWeight(vector&lt;int&gt;&amp; stones) {
    priority_queue&lt;int&gt; q;
    for (int s : stones)
      q.push(s);
    while (q.size() &gt; 1) {
      int x = q.top(); q.pop();
      int y = q.top(); q.pop();
      if (x == y) continue;
      q.push(abs(x - y));
    }
    return q.empty() ? 0 : q.top();
  }
};</pre>
</div></div>



<h2><strong>1047. Remove All Adjacent Duplicates In String</strong></h2>



<p>Solution: Stack / Deque</p>



<p>Time complexity: O(n)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
  string removeDuplicates(string S) {
    deque&lt;char&gt; s;
    for (char c : S) {
      if (!s.empty() &amp;&amp; s.back() == c) s.pop_back();
      else s.push_back(c);
    }    
    return {begin(s), end(s)};
  }
};</pre>
</div></div>



<h2><strong>1048.&nbsp;Longest String Chain</strong></h2>



<p>Solution: DP</p>



<p>dp[i] := max length of chain of (A[0] ~ A[i-1])</p>



<p>dp[i] = max{dp[j] + 1} if A[j] is prederrsor of A[i], 1 &lt;= j &lt;i</p>



<p>Time complexity: O(n^2*l)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua
class Solution {
public:
  int longestStrChain(vector&lt;string&gt;&amp; words) {
    int n = words.size();
    sort(begin(words), end(words), [](const string&amp; a, const string&amp; b) { 
      return a.length() &lt; b.length();
    });
    vector&lt;int&gt; dp(n, 1);    
    for (int i = 0; i &lt; n; ++i)
      for (int j = 0; j &lt; i; ++j) 
        if (valid(words[j], words[i]))
          dp[i] = dp[j] + 1;
    return *max_element(begin(dp), end(dp));
  }
private:
  bool valid(const string&amp; a, const string&amp; b) {
    if (a.length() + 1 != b.length()) return false;
    int count = 0;
    for (int i = 0, j = 0; i &lt; a.length() &amp;&amp; j &lt; b.length();) {
      if (a[i] == b[j]) {
        ++i; ++j;
      } else { 
        ++count; ++j; 
      }
    }
    return count &lt;= 1;
  }
};</pre>
</div></div>



<h2><strong>1049.&nbsp;Last Stone Weight II</strong></h2>



<p><a href="https://leetcode.com/contest/weekly-contest-137/"></a>Solution: DP / target sum</p>



<p>Time complexity: O(n * S) = O(n * 100)</p>



<p>Space complexity: O(S) = O(100)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua
class Solution {
public:
  int lastStoneWeightII(vector&lt;int&gt;&amp; stones) {
    const int n = stones.size();
    const int max_sum = accumulate(begin(stones), end(stones), 0);    
    unordered_set&lt;int&gt; sums;
    sums.insert(stones[0]);
    sums.insert(-stones[0]);
    for (int i = 1; i &lt; n; ++i) {
      unordered_set&lt;int&gt; tmp;
      for (int s : sums) {
        tmp.insert(s + stones[i]);
        tmp.insert(s - stones[i]);
      }
      swap(tmp, sums);
    }
    int ans = INT_MAX;
    for (int s : sums)           
      ans = min(ans, abs(s));
    return ans;
  }
};</pre>
</div></div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-137/">花花酱 LeetCode Weekly Contest 137</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/leetcode/leetcode-weekly-contest-137/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>花花酱 LeetCode Weekly Contest 135 (1037, 1038, 1039, 1040)</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-135-1037-1038-1039-1040/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-135-1037-1038-1039-1040/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 05 May 2019 04:58:09 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=5142</guid>

					<description><![CDATA[<p>LeetCode 1037.&#160;Valid Boomerang Solution: MathTime complexity: O(1)Space complexity: O(1) [crayon-6646c606ca016416121225/] LeetCode 1038. Binary Search Tree to Greater Sum Tree Solution: Recursion: right, root, left Time&#8230;</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-135-1037-1038-1039-1040/">花花酱 LeetCode Weekly Contest 135 (1037, 1038, 1039, 1040)</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2><strong>LeetCode  1037.&nbsp;Valid Boomerang</strong></h2>



<p>Solution: Math<br>Time complexity: O(1)<br>Space complexity: O(1)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
  bool isBoomerang(vector&lt;vector&lt;int&gt;&gt;&amp; points) {
    if (points[0] == points[1] || 
        points[1] == points[2] ||
        points[0] == points[2]) return false;
    int dx0 = points[0][0] - points[1][0];
    int dy0 = points[0][1] - points[1][1];
    int dx1 = points[0][0] - points[2][0];
    int dy1 = points[0][1] - points[2][1];    
    return dy0 * dx1 != dy1 * dx0;
  }
};</pre>
</div></div>



<h2><strong>LeetCode 1038. Binary Search Tree to Greater Sum Tree</strong><br></h2>



<p>Solution: Recursion: right, root, left</p>



<p>Time complexity: O(n)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
  TreeNode* bstToGst(TreeNode* root) {     
    int s = 0;    
    function&lt;void(TreeNode*)&gt; dfs = [&amp;](TreeNode* n) {
      if (!n) return;
      dfs(n-&gt;right);
      n-&gt;val = s += n-&gt;val;      
      dfs(n-&gt;left);
    };
    dfs(root);
    return root;
  }
};</pre>
</div></div>



<h2><strong>1039. Minimum Score Triangulation of Polygon</strong><br></h2>



<figure class="wp-block-image"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/05/1039.png" alt="" class="wp-image-5147" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/05/1039.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/05/1039-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/05/1039-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<p>Solution: DP</p>



<p>Init: dp[i][j] = 0 if  0 &lt;= j &#8211; i &lt;= 1<br>dp[i][j] := min score to triangulate A[i] ~ A[j]<br>dp[i][j] = min{dp[i][k] + dp[k][j] + A[i]*A[k]*A[j]), i &lt; k &lt; j<br>answer: dp[0][n &#8211; 1]</p>



<p>Time complexity: O(n^3)<br>Space complexity: O(n^2)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++/bottom-up</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
  int minScoreTriangulation(vector&lt;int&gt;&amp; A) {
    const int n = A.size();
    vector&lt;vector&lt;int&gt;&gt; dp(n, vector&lt;int&gt;(n));
    for (int l = 3; l &lt;= n; ++l)
      for (int i = 0; i + l &lt;= n; ++i) {        
        int j = i + l - 1;
        dp[i][j] = INT_MAX;
        for (int k = i + 1; k &lt;= j - 1; ++k)
          dp[i][j] = min(dp[i][j], dp[i][k] + dp[k][j] + A[i] * A[k] * A[j]);
      }
    return dp[0][n - 1];
  }
};</pre>

</div><h2 class="tabtitle">C++/top-down</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
  int minScoreTriangulation(vector&lt;int&gt;&amp; A) {
    const int n = A.size();
    vector&lt;vector&lt;int&gt;&gt; dp(n, vector&lt;int&gt;(n, INT_MAX));
    function&lt;int(int, int)&gt; solve = [&amp;](int i, int j) {
      if (j - i &lt;= 1) return 0;
      if (dp[i][j] != INT_MAX) return dp[i][j];
      dp[i][j] = INT_MAX;
      for (int k = i + 1; k &lt;= j - 1; ++k)
        dp[i][j] = min(dp[i][j], 
                       solve(i, k) + solve(k, j) + A[i] * A[k] * A[j]);
      return dp[i][j];  
    };
    return solve(0, n - 1);
  }
};</pre>

</div><h2 class="tabtitle">Python</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">&quot;Author: Huahua&quot;
from functools import lru_cache

class Solution:
  def minScoreTriangulation(self, A: List[int]) -&gt; int:     
    @lru_cache(None)
    def dp(i, j):      
      return 0 if j - i &lt;= 1 else min(dp(i, k) + dp(k, j) + A[i] * A[k] * A[j] for k in range(i + 1, j))
    return dp(0, len(A) - 1)</pre>
</div></div>



<h2><strong> 1040.&nbsp;Moving Stones Until Consecutive II</strong><br></h2>



<p>Solution: Sliding Window</p>



<p>Time complexity: O(nlogn)<br>Space complexity: O(1)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
  vector&lt;int&gt; numMovesStonesII(vector&lt;int&gt;&amp; stones) {
    const int n = static_cast&lt;int&gt;(stones.size());
    sort(begin(stones), end(stones));
    int max_steps = max(stones[n - 1] - stones[1] - n + 2,
                        stones[n - 2] - stones[0] - n + 2);
    int min_steps = INT_MAX;
    int i = 0;
    for (int j = 0; j &lt; n; ++j) {
      while (stones[j] - stones[i] &gt;= n) ++i;
      if (j - i + 1 == n - 1 &amp;&amp; stones[j] - stones[i] == n - 2)
        min_steps = min(min_steps, 2);
      else
        min_steps = min(min_steps, n - (j - i + 1));
    }
    return {min_steps, max_steps};
  }
};</pre>
</div></div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-135-1037-1038-1039-1040/">花花酱 LeetCode Weekly Contest 135 (1037, 1038, 1039, 1040)</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/leetcode/leetcode-weekly-contest-135-1037-1038-1039-1040/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>花花酱 LeetCode Weekly Contest 134 (1033,1034,1035,1036)</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-134/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-134/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 28 Apr 2019 05:42:58 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[leetcode]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=5114</guid>

					<description><![CDATA[<p>1033. Moving Stones Until Consecutive Solution: Math Time complexity: O(1)Space complexity: O(1) [crayon-6646c606ca295204655033/] 1034. Coloring A Border Solution: DFS Time complexity: O(mn)Space complexity: O(mn) [crayon-6646c606ca298987772227/]&#8230;</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-134/">花花酱 LeetCode Weekly Contest 134 (1033,1034,1035,1036)</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2><strong>1033. Moving Stones Until Consecutive</strong></h2>



<p>Solution: Math</p>



<p>Time complexity: O(1)<br>Space complexity: O(1)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, running time: 4 ms / 8.3 MB
class Solution {
public:
  vector&lt;int&gt; numMovesStones(int a, int b, int c) {
    if (a &gt; c) swap(a, c);
    if (a &gt; b) swap(a, b);
    if (b &gt; c) swap(b, c);
    int u = c - b - 1 + (b - a -1);
    int l = 0;
    if (a + 1 == b &amp;&amp; b + 1 == c) l = 0;
    else if (a + 2 &gt;= b || b + 2 &gt;= c) l = 1;
    else l = 2;
    return {l, u};
  }
};</pre>
</div></div>



<h2><strong>1034. Coloring A Border</strong><br></h2>



<p>Solution: DFS</p>



<p>Time complexity: O(mn)<br>Space complexity: O(mn)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, 52 MB / 12.6 MB
class Solution {
public:
  vector&lt;vector&lt;int&gt;&gt; colorBorder(vector&lt;vector&lt;int&gt;&gt;&amp; grid, int r0, int c0, int color) {
    vector&lt;vector&lt;int&gt;&gt; b(grid.size(), vector&lt;int&gt;(grid[0].size()));
    dfs(grid, r0, c0, grid[r0][c0], b);
    for (int i = 0; i &lt; b.size(); ++i)
      for (int j = 0; j &lt; b[0].size(); ++j)
        if (b[i][j] &gt; 0) grid[i][j] = color;
    return grid;
  }
private:
  bool dfs(const vector&lt;vector&lt;int&gt;&gt;&amp; grid, int r, int c, int color, vector&lt;vector&lt;int&gt;&gt;&amp; b) {
    if (r &lt; 0 || c &lt; 0 || r &gt;= grid.size() || c &gt;= grid[0].size()) return true;
    if (grid[r][c] != color) return true;
    if (b[r][c]) return false;
    b[r][c] = -1;
    bool valid = dfs(grid, r + 1, c, color, b) |
                 dfs(grid, r - 1, c, color, b) | 
                 dfs(grid, r, c + 1, color, b) |
                 dfs(grid, r, c - 1, color, b);
    if (valid) b[r][c] = 1;
    return false;
  }
};</pre>
</div></div>



<h2><strong>1035. Uncrossed Lines</strong><br></h2>



<p>Solution: LCS</p>



<p>Time complexity: O(nm)<br>Space complexity: O(mn)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, 12 ms / 12.1 MB
class Solution {
public:
  int maxUncrossedLines(vector&lt;int&gt;&amp; A, vector&lt;int&gt;&amp; B) {
    const int m = A.size();
    const int n = B.size();
    vector&lt;vector&lt;int&gt;&gt; dp(m + 1, vector&lt;int&gt;(n + 1));
    dp[0][0] = 0;
    for (int i = 1; i &lt;= m; ++i)
      for (int j = 1; j &lt;= n; ++j) {        
        if (A[i - 1] == B[j - 1]) 
          dp[i][j] = dp[i-1][j-1] + 1;
        else
          dp[i][j] = max(dp[i][j - 1], dp[i - 1][j]);
      }
    return dp[m][n];
  }
};</pre>
</div></div>



<h2><strong>1036. Escape a Large Maze</strong></h2>



<p>Solution: limited search</p>



<p>Time complexity: O(b^2)<br>Space complexity: O(b^2)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

// Author: Huahua, running time: 168 ms, 49.7 MB
class Solution {
public:
  bool isEscapePossible(vector<vector<int>>&#038; blocked, vector<int>&#038; source, vector<int>&#038; target) {        
    for (const auto&#038; p : blocked)
      b.insert(static_cast<long>(p[0]) << 32 | p[1]);
    seen = 0;
    t = target;
    bool first = dfs(source[0], source[1]);
    t = source;
    bool second = dfs(target[0], target[1]);
    return first &#038;&#038; second;
  }
private:
  const static int kMaxN = 1000000;
  const static int kMaxSeen = 20000;
  unordered_set<long> b;
  vector<int> t;
  int seen;
  int tx;
  int ty;
  
  bool dfs(int x, int y) {
    if (x < 0 || y < 0 || x >= kMaxN || y >= kMaxN) return false;
    if (x == t[0] &#038;&#038; y == t[1]) return true;
    long key = static_cast<long>(x) << 32 | y;
    if (b.find(key) != b.end()) return false;    
    b.insert(key);
    if (++seen > kMaxSeen) return true;    
    return dfs(x + 1, y) ||
           dfs(x &#8211; 1, y) ||
           dfs(x, y + 1) ||
           dfs(x, y &#8211; 1);
  }
};
</div></div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-134/">花花酱 LeetCode Weekly Contest 134 (1033,1034,1035,1036)</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/leetcode/leetcode-weekly-contest-134/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>花花酱 LeetCode Weekly Contest 132 (1025,1026,1027,1028)</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-132/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-132/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 14 Apr 2019 04:12:05 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=5064</guid>

					<description><![CDATA[<p>1025. Divisor Game Solution: Recursion with Memoization Time complexity: O(n^2)Space complexity: O(n) [crayon-6646c606ca467032597861/] 1026. Maximum Difference Between Node and Ancestor Solution: Resolution, pass min /&#8230;</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-132/">花花酱 LeetCode Weekly Contest 132 (1025,1026,1027,1028)</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe width="500" height="375" src="https://www.youtube.com/embed/QRSDXF8ZrmE?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<p><strong>1025. Divisor Game</strong></p>



<p>Solution: Recursion with Memoization</p>



<p>Time complexity: O(n^2)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, running time: 12 ms
class Solution {
public:
  bool divisorGame(int N) {
    cache_ = vector&lt;int&gt;(N + 1, -1);
    return canWin(N);
  }
private:
  vector&lt;int&gt; cache_;
  bool canWin(int N) {
    if (N == 1) return false;
    if (cache_[N] != -1) return cache_[N];
    bool win = false;
    for (int i = 1; i &lt; N; ++i)
      if (N % i == 0)
        win |= !canWin(N - i);
    return cache_[N] = win;
  }
};</pre>
</div></div>



<p><strong>1026. Maximum Difference Between Node and Ancestor</strong></p>



<p>Solution: Resolution, pass min / max of ancestor nodes</p>



<p>Time complexity: O(n)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
  int maxAncestorDiff(TreeNode* root) {
    if (!root) return 0;
    return maxDiff(root, root-&amp;gt;val, root-&amp;gt;val);
  }
private:
  int maxDiff(TreeNode* root, int l, int r) {
    if (!root) return 0;
    int cur = max(abs(root-&amp;gt;val - l), abs(root-&amp;gt;val - r));
    l = min(l, root-&amp;gt;val);
    r = max(r, root-&amp;gt;val);
    return max(cur, max(maxDiff(root-&amp;gt;left, l, r),
                        maxDiff(root-&amp;gt;right, l, r)));
  }
};</pre>
</div></div>



<p><strong>1027.  Longest Arithmetic Sequence </strong></p>



<p>Solution 1: Brute Force + Pruning</p>



<p>Time complexity: O(n^3) ~ O(n^2) in practice<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, running time: 352 ms
class Solution {
public:
  int longestArithSeqLength(vector&lt;int&gt;&amp; A) {
    int n = A.size();
    unordered_set&lt;int&gt; h;
    int ans = 2;
    for (int a: A) h.insert(a);
    for (int i = 0; i &lt; n - 1; ++i)
      for (int j = i + 1; j &lt; n; ++j) {
        int d = (A[j] - A[i]);
        int t = A[j] + d;
        int l = 2;
        if (!h.count(t)) continue;
        int k = j + 1;
        for (int k = j + 1; k &lt; n; ++k)
          if (A[k] == t) {
            t += d;
            ++l;
          }        
        ans = max(ans, l);
      }
    return ans;
  }
};</pre>
</div></div>



<p><strong>1028. Recover a Tree From Preorder Traversal</strong></p>



<p>Solution: Recursion</p>



<p>Check the current depth and expected depth, if don&#8217;t match, return nullptr.</p>



<p>Time complexity: O(n)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, running time: 24 ms
class Solution {
public:
  TreeNode* recoverFromPreorder(string S) {
    int i = 0;
    return recover(S, i, 0);
  }
private:
  TreeNode* recover(const string&amp; s, int&amp; i, int depth) {    
    const int d = getD(s, i);
    if (d != depth) { i -= d; return nullptr; }    
    auto root = new TreeNode(getVal(s, i));
    root-&gt;left = recover(s, i, d + 1);    
    root-&gt;right = recover(s, i, d + 1);
    return root;
  }
  
  int getD(const string&amp; s, int&amp; i) {
    int d = 0;
    while (i &lt; s.length() &amp;&amp; s[i] == '-') {++d; ++i;}
    return d;
  }
  
  int getVal(const string&amp; s, int&amp; i) {
    int val = 0;
    while (i &lt; s.length() &amp;&amp; isdigit(s[i]))
      val = val * 10 + (s[i++] - '0');       
    return val;
  }
};</pre>
</div></div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-132/">花花酱 LeetCode Weekly Contest 132 (1025,1026,1027,1028)</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/leetcode/leetcode-weekly-contest-132/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>花花酱 LeetCode Weekly Contest 131 (1021, 1022, 1023, 1024)</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-131-1021-1022-1023-1024/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-131-1021-1022-1023-1024/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 07 Apr 2019 22:46:19 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[leetcode]]></category>
		<category><![CDATA[weekly]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=5015</guid>

					<description><![CDATA[<p>LeetCode 1021. Remove Outermost Parentheses Solution: Track # of opened parentheses Let n denote the # of opened parentheses after current char, keep &#8216;(&#8216; if&#8230;</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-131-1021-1022-1023-1024/">花花酱 LeetCode Weekly Contest 131 (1021, 1022, 1023, 1024)</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><strong>LeetCode 1021. Remove Outermost Parentheses</strong></p>



<p>Solution: Track # of opened parentheses</p>



<p>Let n denote the # of  opened parentheses after current char, keep &#8216;(&#8216; if n &gt; 1 and keep &#8216;)&#8217; if n &gt; 0</p>



<p>Time complexity: O(n)<br>Space complexity: O(1)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua
class Solution {
public:
  string removeOuterParentheses(string S) {    
    string ans;
    int n = 0;    
    for (char c : S) {      
      if (c == '(' &amp;amp;&amp;amp; n++) ans += c;
      if (c == ')' &amp;amp;&amp;amp; --n) ans += c;      
    }
    return ans;
  }
};</pre>
</div></div>



<p><strong>LeetCode 1022. Sum of Root To Leaf Binary Numbers</strong></p>



<p>Solution: Recursion + Math</p>



<p>Keep tracking the number from root to current node.</p>



<p>Time complexity: O(n)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">class Solution {
public:
    int sumRootToLeaf(TreeNode* root) {      
      return sums(root, 0);
    }
private:
    static constexpr int kMod = 1e9 + 7;
    int sums(TreeNode* root, int c) {
      if (!root) return 0;
      c = ((c &lt;&lt; 1) | root-&gt;val) % kMod;
      if (!root-&gt;left &amp;&amp; !root-&gt;right) {
        return c;
      }
      return sums(root-&gt;left, c) + sums(root-&gt;right, c);
    }
};</pre>
</div></div>



<p><strong>LeetCode 1023. Camelcase Matching</strong></p>



<p>Solution: String&#8230;</p>



<p>Time complexity: O(n)<br>Space complexity: O(n)</p>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua
class Solution {
public:
  vector&lt;bool&gt; camelMatch(vector&lt;string&gt;&amp; queries, string p) {
    vector&lt;bool&gt; ans;
    for (const string&amp; q : queries)
      ans.push_back(match(q, p));
    return ans;
  }
private:
  bool match(const string&amp; q, const string&amp; p) {    
    int m = p.length();
    int n = q.length();
    int i = 0;
    int j = 0;
    for (i = 0; i &lt; n; ++i) {      
      if (j == m &amp;&amp; isupper(q[i])) return false;      
      if ((j == m || isupper(p[j])) &amp;&amp; islower(q[i])) continue;        
      if ((isupper(p[j]) || isupper(q[i])) &amp;&amp; p[j] != q[i]) return false;
      if (islower(p[j]) &amp;&amp; p[j] != q[i]) continue;
      ++j;
    }
    return i == n &amp;&amp; j == m;
  }
};</pre>
</div></div>



<p><strong>LeetCode 1024. Video Stitching</strong></p>



<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe width="500" height="375" src="https://www.youtube.com/embed/tdrPFN9d1y4?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<p>Solution 1: DP</p>



<p>Time complexity: O(nT^2)<br>Space complexity: O(T^2)</p>



<figure class="wp-block-image"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/04/1024-ep248.png" alt="" class="wp-image-5024" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/04/1024-ep248.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/04/1024-ep248-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/04/1024-ep248-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<div class="responsive-tabs">
<h2 class="tabtitle">C++</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, 16 ms / 9.5 MB
class Solution {
public:
  int videoStitching(vector&lt;vector&lt;int&gt;&gt;&amp; clips, int T) {
    constexpr int kInf = 101;
    // dp[i][j] := min clips to cover range [i, j]
    vector&lt;vector&lt;int&gt;&gt; dp(T + 1, vector&lt;int&gt;(T + 1, kInf));   
    for (const auto&amp; c : clips) {
      int s = c[0];
      int e = c[1];
      for (int l = 1; l &lt;= T; ++l) {
        for (int i = 0; i &lt;= T - l; ++i) {
          int j = i + l;
          if (s &gt; j || e &lt; i) continue;
          if (s &lt;= i &amp;&amp; e &gt;= j) dp[i][j] = 1;
          else if (e &gt;= j) dp[i][j] = min(dp[i][j], dp[i][s] + 1);
          else if (s &lt;= i) dp[i][j] = min(dp[i][j], dp[e][j] + 1);
          else dp[i][j] = min(dp[i][j], dp[i][s] + 1 + dp[e][j]);          
        }
      }
    }
    return dp[0][T] == kInf ? -1 : dp[0][T];
  }
};</pre>

</div><h2 class="tabtitle">C++/V2</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">// Author: Huahua, running time: 20 ms / 9.4 MB
class Solution {
public:
  int videoStitching(vector&lt;vector&lt;int&gt;&gt;&amp; clips, int T) {
    constexpr int kInf = 101;
    // dp[i][j] := min clips to cover range [i, j]
    vector&lt;vector&lt;int&gt;&gt; dp(T + 1, vector&lt;int&gt;(T + 1));
    for (int i = 0; i &lt;= T; ++i)
      for (int j = 0; j &lt;= T; ++j)
        dp[i][j] = i &lt; j ? kInf : 0;
    for (const auto&amp; c : clips) {
      const int s = min(c[0], T);
      const int e = min(c[1], T);
      for (int l = 1; l &lt;= T; ++l)
        for (int i = 0, j = l; j &lt;= T; ++i, ++j)
          dp[i][j] = min(dp[i][j], dp[i][s] + 1 + dp[e][j]);
    }
    return dp[0][T] == kInf ? -1 : dp[0][T];
  }
};</pre>
</div></div>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-131-1021-1022-1023-1024/">花花酱 LeetCode Weekly Contest 131 (1021, 1022, 1023, 1024)</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/leetcode/leetcode-weekly-contest-131-1021-1022-1023-1024/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>花花酱 LeetCode Weekly 125</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-125/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-125/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 24 Feb 2019 20:56:09 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=4903</guid>

					<description><![CDATA[<p>Problems https://zxi.mytechroad.com/blog/graph/leetcode-997-find-the-town-judge/ https://zxi.mytechroad.com/blog/tree/leetcode-998-maximum-binary-tree-ii/ https://zxi.mytechroad.com/blog/simulation/leetcode-999-available-captures-for-rook/ https://zxi.mytechroad.com/blog/hashtable/leetcode-1001-grid-illumination/</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-125/">花花酱 LeetCode Weekly 125</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/ACBdojAxPSc?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>


<h2>Problems</h2>



<ul><li><a href="https://zxi.mytechroad.com/blog/graph/leetcode-997-find-the-town-judge/">https://zxi.mytechroad.com/blog/graph/leetcode-997-find-the-town-judge/</a></li><li><a href="https://zxi.mytechroad.com/blog/tree/leetcode-998-maximum-binary-tree-ii/">https://zxi.mytechroad.com/blog/tree/leetcode-998-maximum-binary-tree-ii/</a></li><li><a href="https://zxi.mytechroad.com/blog/simulation/leetcode-999-available-captures-for-rook/">https://zxi.mytechroad.com/blog/simulation/leetcode-999-available-captures-for-rook/</a></li><li><a href="https://zxi.mytechroad.com/blog/hashtable/leetcode-1001-grid-illumination/">https://zxi.mytechroad.com/blog/hashtable/leetcode-1001-grid-illumination/</a></li></ul>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-125/">花花酱 LeetCode Weekly 125</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/leetcode/leetcode-weekly-125/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>LeetCode Weekly Contest 124</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-124/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-124/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 17 Feb 2019 19:43:57 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=4879</guid>

					<description><![CDATA[<p>Solutions https://zxi.mytechroad.com/blog/tree/leetcode-993-cousins-in-binary-tree/ https://zxi.mytechroad.com/blog/searching/leetcode-994-rotting-oranges/ https://zxi.mytechroad.com/blog/greedy/leetcode-995-minimum-number-of-k-consecutive-bit-flips/ https://zxi.mytechroad.com/blog/searching/leetcode-996-number-of-squareful-arrays/</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-124/">LeetCode Weekly Contest 124</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe width="500" height="375" src="https://www.youtube.com/embed/ISnktonx7rY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<figure class="wp-block-image"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-124.png" alt="" class="wp-image-4881" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-124.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-124-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-124-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<h2><strong>Solutions</strong></h2>



<ul><li><a href="https://zxi.mytechroad.com/blog/tree/leetcode-993-cousins-in-binary-tree/">https://zxi.mytechroad.com/blog/tree/leetcode-993-cousins-in-binary-tree/</a></li><li><a href="https://zxi.mytechroad.com/blog/searching/leetcode-994-rotting-oranges/">https://zxi.mytechroad.com/blog/searching/leetcode-994-rotting-oranges/</a></li><li><a href="https://zxi.mytechroad.com/blog/greedy/leetcode-995-minimum-number-of-k-consecutive-bit-flips/">https://zxi.mytechroad.com/blog/greedy/leetcode-995-minimum-number-of-k-consecutive-bit-flips/</a></li><li><a href="https://zxi.mytechroad.com/blog/searching/leetcode-996-number-of-squareful-arrays/">https://zxi.mytechroad.com/blog/searching/leetcode-996-number-of-squareful-arrays/</a></li></ul>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-124/">LeetCode Weekly Contest 124</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/leetcode/leetcode-weekly-contest-124/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>花花酱 LeetCode Weekly Contest 122</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-122/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-122/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 03 Feb 2019 08:46:43 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=4784</guid>

					<description><![CDATA[<p>https://zxi.mytechroad.com/blog/simulation/leetcode-985-sum-of-even-numbers-after-queries/ https://zxi.mytechroad.com/blog/geometry/leetcode-986-interval-list-intersections/ https://zxi.mytechroad.com/blog/tree/leetcode-987-vertical-order-traversal-of-a-binary-tree/ https://zxi.mytechroad.com/blog/tree/leetcode-988-smallest-string-starting-from-leaf/</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-122/">花花酱 LeetCode Weekly Contest 122</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe width="500" height="375" src="https://www.youtube.com/embed/5xL_N2S3-QU?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<figure class="wp-block-image"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-122.png" alt="" class="wp-image-4785" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-122.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-122-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2019/02/weekly-122-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<ul><li><a href="https://zxi.mytechroad.com/blog/simulation/leetcode-985-sum-of-even-numbers-after-queries/">https://zxi.mytechroad.com/blog/simulation/leetcode-985-sum-of-even-numbers-after-queries/</a></li><li><a href="https://zxi.mytechroad.com/blog/geometry/leetcode-986-interval-list-intersections/">https://zxi.mytechroad.com/blog/geometry/leetcode-986-interval-list-intersections/</a></li><li><a href="https://zxi.mytechroad.com/blog/tree/leetcode-987-vertical-order-traversal-of-a-binary-tree/">https://zxi.mytechroad.com/blog/tree/leetcode-987-vertical-order-traversal-of-a-binary-tree/</a></li><li><a href="https://zxi.mytechroad.com/blog/tree/leetcode-988-smallest-string-starting-from-leaf/">https://zxi.mytechroad.com/blog/tree/leetcode-988-smallest-string-starting-from-leaf/</a></li></ul>



<p></p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-122/">花花酱 LeetCode Weekly Contest 122</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/leetcode/leetcode-weekly-contest-122/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>LeetCode Weekly Contest 113</title>
		<link>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-113/</link>
					<comments>https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-113/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Sun, 02 Dec 2018 03:47:20 +0000</pubDate>
				<category><![CDATA[Leetcode]]></category>
		<category><![CDATA[rank]]></category>
		<category><![CDATA[weekly contest]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=4389</guid>

					<description><![CDATA[<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-113/">LeetCode Weekly Contest 113</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><img class="alignnone size-large wp-image-4390" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2018/12/contest-1024x627.png" alt="" width="1024" height="627" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2018/12/contest-1024x627.png 1024w, https://zxi.mytechroad.com/blog/wp-content/uploads/2018/12/contest-300x184.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2018/12/contest-768x470.png 768w, https://zxi.mytechroad.com/blog/wp-content/uploads/2018/12/contest.png 1435w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/leetcode/leetcode-weekly-contest-113/">LeetCode Weekly Contest 113</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/leetcode/leetcode-weekly-contest-113/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
