<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sunturing的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/sunturing</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sunturing]]></copyright><item><title><![CDATA[LeetCode 90. Subsets II]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75949926</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75949926</guid><author>sunturing</author><pubDate>Mon, 24 Jul 2017 04:27:41 +0800</pubDate><description><![CDATA[Given a collection of integers that might contain duplicates, nums, return all possible subsets.
Note: The solution set must not contain duplicate subsets.
For example,
If nums = [1,2,2], a solutio]]></description><category></category></item><item><title><![CDATA[LeetCode 89. Gray Code]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75949911</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75949911</guid><author>sunturing</author><pubDate>Mon, 24 Jul 2017 03:13:18 +0800</pubDate><description><![CDATA[The gray code is a binary numeral system where two successive values differ in only one bit.

Given a non-negative integer n representing the total number of bits in the code, print the sequence of ]]></description><category></category></item><item><title><![CDATA[LeetCode 88. Merge Sorted Array]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75949902</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75949902</guid><author>sunturing</author><pubDate>Mon, 24 Jul 2017 02:56:49 +0800</pubDate><description><![CDATA[Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additio]]></description><category></category></item><item><title><![CDATA[LeetCode 87.Scramble String]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75195408</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75195408</guid><author>sunturing</author><pubDate>Sun, 16 Jul 2017 02:44:55 +0800</pubDate><description><![CDATA[Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
    great
   /    \
  gr]]></description><category></category></item><item><title><![CDATA[LeetCode 86. Partition List]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75195362</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75195362</guid><author>sunturing</author><pubDate>Sun, 16 Jul 2017 01:47:17 +0800</pubDate><description><![CDATA[Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of the nodes in each of t]]></description><category></category></item><item><title><![CDATA[LeetCode 85. Maximal Rectangle]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75194273</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75194273</guid><author>sunturing</author><pubDate>Sat, 15 Jul 2017 21:50:06 +0800</pubDate><description><![CDATA[Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.

For example, given the following matrix:
1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1]]></description><category></category></item><item><title><![CDATA[LeetCode 84. Largest Rectangle in Histogram]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75174944</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75174944</guid><author>sunturing</author><pubDate>Sat, 15 Jul 2017 17:32:12 +0800</pubDate><description><![CDATA[Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.


Above is a histogram where width of ea]]></description><category></category></item><item><title><![CDATA[LeetCode 83. Remove Duplicates from Sorted List]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75158671</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75158671</guid><author>sunturing</author><pubDate>Sat, 15 Jul 2017 14:21:20 +0800</pubDate><description><![CDATA[Given a sorted linked list, delete all duplicates such that each element appear only once.

For example,
Given 1->1->2, return 1->2.

Given 1->1->2->3->3, return 1->2->3.
链表去重，比上一题简单很多，两个指针就够了
]]></description><category></category></item><item><title><![CDATA[LeetCode 82. Remove Duplicates from Sorted List II]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75142423</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75142423</guid><author>sunturing</author><pubDate>Sat, 15 Jul 2017 02:14:13 +0800</pubDate><description><![CDATA[Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.

For example,
Given 1->2->3->3->4->4->5, return 1->2->5.

Given 1->]]></description><category></category></item><item><title><![CDATA[LeetCode 81. Search in Rotated Sorted Array II]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75094626</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75094626</guid><author>sunturing</author><pubDate>Fri, 14 Jul 2017 00:09:20 +0800</pubDate><description><![CDATA[Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?


Suppose an array sorted in ascending order is rotated at ]]></description><category></category></item><item><title><![CDATA[LeetCode 80. Remove Duplicates from Sorted Array II]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75093576</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75093576</guid><author>sunturing</author><pubDate>Thu, 13 Jul 2017 22:17:15 +0800</pubDate><description><![CDATA[Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?

For example,
Given sorted array nums = [1,1,1,2,2,3],

Your function should return length = 5, with the first fi]]></description><category></category></item><item><title><![CDATA[LeetCode 79. Word Search]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75089445</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75089445</guid><author>sunturing</author><pubDate>Thu, 13 Jul 2017 18:19:59 +0800</pubDate><description><![CDATA[Given a 2D board and a word, find if the word exists in the grid.

The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically]]></description><category></category></item><item><title><![CDATA[LeetCode 78. Subsets]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/75042773</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/75042773</guid><author>sunturing</author><pubDate>Thu, 13 Jul 2017 01:26:55 +0800</pubDate><description><![CDATA[Given a set of distinct integers, nums, return all possible subsets.
Note: The solution set must not contain duplicate subsets.
For example,
If nums = [1,2,3], a solution
 is:
[
  [3],
  [1],
  []]></description><category></category></item><item><title><![CDATA[LeetCode 77. Combinations]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/74946725</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/74946725</guid><author>sunturing</author><pubDate>Tue, 11 Jul 2017 13:22:50 +0800</pubDate><description><![CDATA[Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
  [2,4],
  [3,4],
  [2,3],
  [1,2],
  [1,3],
  [1,4],
]
]]></description><category></category></item><item><title><![CDATA[LeetCode 76. Minimum Window Substring]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/74938264</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/74938264</guid><author>sunturing</author><pubDate>Tue, 11 Jul 2017 01:31:52 +0800</pubDate><description><![CDATA[Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).

For example,
S = "ADOBECODEBANC"
T = "ABC"


Minimum window is "BAN]]></description><category></category></item><item><title><![CDATA[LeetCode 75. Sort Colors]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/74907171</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/74907171</guid><author>sunturing</author><pubDate>Mon, 10 Jul 2017 02:10:27 +0800</pubDate><description><![CDATA[Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers 0,]]></description><category></category></item><item><title><![CDATA[LeetCode 74. Search a 2D Matrix]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/74906300</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/74906300</guid><author>sunturing</author><pubDate>Mon, 10 Jul 2017 02:10:07 +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]]></description><category></category></item><item><title><![CDATA[LeetCode 73. Set Matrix Zeroes]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/74904835</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/74904835</guid><author>sunturing</author><pubDate>Sun, 09 Jul 2017 19:22:16 +0800</pubDate><description><![CDATA[Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.

click to show follow up.

用额外空间去记录一下哪个位置出现了0，一个记录行，一个记录列，碰到这两个索引之一直接置0

import java.util.ArrayList;]]></description><category></category></item><item><title><![CDATA[LeetCode 72. Edit Distance]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/74899558</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/74899558</guid><author>sunturing</author><pubDate>Sun, 09 Jul 2017 18:43:46 +0800</pubDate><description><![CDATA[Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)

You have the following 3 operations permitted on a word:]]></description><category></category></item><item><title><![CDATA[LeetCode 71. Simplify Path]]></title><link>https://blog.youkuaiyun.com/sunturing/article/details/74892961</link><guid>https://blog.youkuaiyun.com/sunturing/article/details/74892961</guid><author>sunturing</author><pubDate>Sun, 09 Jul 2017 16:47:20 +0800</pubDate><description><![CDATA[Given an absolute path for a file (Unix-style), simplify it.
For example,
path = "/home/",
 => "/home"


path = "/a/./b/../../c/", => "/c"
简化unix的路径符号，/..是返回上一级，/.是保持当前目录，需要做的就是字符串的判断，要有equals来]]></description><category></category></item></channel></rss>