Leetcode-Question-735: Asteroid Collision

Original Link:

https://leetcode.com/problems/asteroid-collision/

Solution:

 

Leetcode-Question-734: Sentence Similarity

Original Link:

https://leetcode.com/problems/sentence-similarity/

Solution:

 

 

Leetcode-Question-733: Flood Fill

Original Link:

https://leetcode.com/problems/flood-fill/

Solution:

 

The-Happy-Coder-01: Koch Snowflake

Original Link:
http://www.geeksforgeeks.org/koch-curve-koch-snowflake/

Code:

Leetcode-Question-728: Self Dividing Numbers

原文链接:
https://leetcode.com/contest/weekly-contest-59/problems/self-dividing-numbers/

解析:

 

Leetcode-Question-729: My Calendar I

Original Link:

https://leetcode.com/contest/weekly-contest-59/problems/my-calendar-i/

Solution:

【法1】竞赛时的解法:有点动脑筋。

或者,

【法2】追踪变化

 

 

 

Leetcode-Question-731: My Calendar II

原文链接:

https://leetcode.com/contest/weekly-contest-59/problems/my-calendar-ii/

解析:

【法1】

【法2】追踪变化

【法2简化版】

 

【拳不离手曲不离口系列】Leetcode-Weekly-Contest-58

第一题
http://storypku.com/2017/11/leetcode-question-724-find-pivot-index/

第二题
http://storypku.com/2017/11/leetcode-question-725-split-linked-list-in-parts/

第三题
http://storypku.com/2017/11/leetcode-question-726-number-of-atoms/

第四题
http://storypku.com/2017/11/leetcode-question-727-minimum-window-subsequence/

Leetcode-Question-727: Minimum Window Subsequence

Original Link:

https://leetcode.com/contest/weekly-contest-58/problems/minimum-window-subsequence/

Description:

Given strings S and T, find the minimum (contiguous) substring W of S, so that T is a subsequence of W.

If there is no such window in S that covers all characters in T, return the empty string "". If there are multiple such minimum-length windows, return the one with the left-most starting index.

Example 1:

Note:

  • All the strings in the input will only contain lowercase letters.
  • The length of S will be in the range [1, 20000].
  • The length of T will be in the range [1, 100].

Solution:

 

Leetcode-Question-726: Number of Atoms

Original Link:

https://leetcode.com/problems/number-of-atoms/

Solution: