<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[NoooName的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/NoooName</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; NoooName]]></copyright><item><title><![CDATA[[Leetcode]Sudoku Solver]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44643581</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44643581</guid><author>NoooName</author><pubDate>Thu, 26 Mar 2015 05:01:12 +0800</pubDate><description><![CDATA[Write a program to solve a Sudoku puzzle by filling the empty cells.

Empty cells are indicated by the character '.'.

You may assume that there will be only one unique solution.




A sudoku]]></description><category></category></item><item><title><![CDATA[[Leetcode]Majority Element]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44635945</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44635945</guid><author>NoooName</author><pubDate>Thu, 26 Mar 2015 01:13:27 +0800</pubDate><description><![CDATA[Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊
 n/2 ⌋ times.

You may assume that the array is non-empty and the majority element ]]></description><category></category></item><item><title><![CDATA[[Leetcode]Number of 1 Bits]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44635355</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44635355</guid><author>NoooName</author><pubDate>Thu, 26 Mar 2015 01:06:47 +0800</pubDate><description><![CDATA[Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming
 weight).

For example, the 32-bit integer ’11' has binary representation 000000]]></description><category></category></item><item><title><![CDATA[[Leetcode]Word Ladder]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44615309</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44615309</guid><author>NoooName</author><pubDate>Wed, 25 Mar 2015 06:07:04 +0800</pubDate><description><![CDATA[Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:

Only one letter can be changed at a timeEach intermediate word m]]></description><category></category></item><item><title><![CDATA[[Leetcode]Palindrome Partitioning II]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44609361</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44609361</guid><author>NoooName</author><pubDate>Wed, 25 Mar 2015 01:22:00 +0800</pubDate><description><![CDATA[Given a string s, partition s such that every substring of the partition is a palindrome.

Return the minimum cuts needed for a palindrome partitioning of s.

For example, given s = "aab",

Retu]]></description><category></category></item><item><title><![CDATA[[Leetcode]Clone Graph]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44486325</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44486325</guid><author>NoooName</author><pubDate>Fri, 20 Mar 2015 06:49:45 +0800</pubDate><description><![CDATA[Clone an undirected graph. Each node in the graph contains a label and a list
 of its neighbors.

OJ's undirected graph serialization:
Nodes are labeled uniquely.
We use # as a separator for each]]></description><category></category></item><item><title><![CDATA[[Leetcode]Merge k Sorted Lists]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44449125</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44449125</guid><author>NoooName</author><pubDate>Thu, 19 Mar 2015 08:05:25 +0800</pubDate><description><![CDATA[Merge k sorted
 linked lists and return it as one sorted list. Analyze and describe its complexity.
合并k个有序的链表~
brute force的方法是把这k个链表一个一个的合并起来，如 k个链表为[l1, l2, l3, l4]，可以先合并l1, l2，再把合并得到的链表与l3合并，最后再与]]></description><category></category></item><item><title><![CDATA[[Leetcode]Longest Substring with At Most Two Distinct Characters]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44388667</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44388667</guid><author>NoooName</author><pubDate>Wed, 18 Mar 2015 04:54:02 +0800</pubDate><description><![CDATA[Given a string
S, find the length of the longest substring
T
that contains at most two distinct characters.
For example,
Given S
= “eceba”,

T 
is "ece" which its length is 3. 
给定一个字符串S，找到最长]]></description><category></category></item><item><title><![CDATA[[Leetcode]Valid Number]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44340877</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44340877</guid><author>NoooName</author><pubDate>Tue, 17 Mar 2015 13:59:57 +0800</pubDate><description><![CDATA[Validate if a given string is numeric.

Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true


Note: It is intended for the problem statement to be ambiguo]]></description><category></category></item><item><title><![CDATA[[Leetcode]Interleaving String]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44255257</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44255257</guid><author>NoooName</author><pubDate>Sat, 14 Mar 2015 05:03:58 +0800</pubDate><description><![CDATA[Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.

For example,
Given:
s1 = "aabcc",
s2 = "dbbca",

When s3 = "aadbbcbcac", return true.

When s3 = "aadbbbaccc", r]]></description><category></category></item><item><title><![CDATA[[Leetcode]Largest Rectangle in Histogram]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44254521</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44254521</guid><author>NoooName</author><pubDate>Sat, 14 Mar 2015 03:27:07 +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 o]]></description><category></category></item><item><title><![CDATA[[Leetcode]Pow(x, n)]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44238145</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44238145</guid><author>NoooName</author><pubDate>Sat, 14 Mar 2015 01:55:26 +0800</pubDate><description><![CDATA[Implement pow(x, n).
用二分法~把x的n次方划分成两个x的n/2次方相乘，然后递归求解~注意n为负数的情况~代码复杂度为O(logn)~
 还可以加上越界的判断~
class Solution:
    # @param x, a float
    # @param n, a integer
    # @return a float
    def pow(self,]]></description><category></category></item><item><title><![CDATA[[Leetcode]Substring with Concatenation of All Words]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44235687</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44235687</guid><author>NoooName</author><pubDate>Fri, 13 Mar 2015 05:20:21 +0800</pubDate><description><![CDATA[You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once
 and without ]]></description><category></category></item><item><title><![CDATA[[Leetcode]Multiply Strings]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44235203</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44235203</guid><author>NoooName</author><pubDate>Fri, 13 Mar 2015 04:28:45 +0800</pubDate><description><![CDATA[Given two numbers represented as strings, return multiplication of the numbers as a string.

Note: The numbers can be arbitrarily large and are non-negative.

大数乘法~依旧是从低位到高位进行运算，可以先把num1, num2反转以方]]></description><category></category></item><item><title><![CDATA[[Leetcode]Insert Interval]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44216377</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44216377</guid><author>NoooName</author><pubDate>Thu, 12 Mar 2015 06:56:24 +0800</pubDate><description><![CDATA[Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).

You may assume that the intervals were initially sorted according to their start times.

E]]></description><category></category></item><item><title><![CDATA[[Leetcode]Merge Intervals]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44193399</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44193399</guid><author>NoooName</author><pubDate>Wed, 11 Mar 2015 06:21:52 +0800</pubDate><description><![CDATA[Given a collection of intervals, merge all overlapping intervals.

For example,
Given [1,3],[2,6],[8,10],[15,18],

return [1,6],[8,10],[15,18].
要求合并若干个区间~记得先把intervals按start值排序~


# Definitio]]></description><category></category></item><item><title><![CDATA[[Leetcode]Next Permutation]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/44190935</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/44190935</guid><author>NoooName</author><pubDate>Wed, 11 Mar 2015 02:56:05 +0800</pubDate><description><![CDATA[Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.

If such arrangement is not possible, it must rearrange it as the lowest possible]]></description><category></category></item><item><title><![CDATA[[Leetcode]Permutation Sequence]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/43734091</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/43734091</guid><author>NoooName</author><pubDate>Wed, 11 Feb 2015 14:55:16 +0800</pubDate><description><![CDATA[The set [1,2,3,…,n] contains a total of n!
 unique permutations.

By listing and labeling all of the permutations in order,
We get the following sequence (ie, for n = 3):

"123""132""213""231""3]]></description><category></category></item><item><title><![CDATA[[Leetcode]First Missing Positive]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/43710993</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/43710993</guid><author>NoooName</author><pubDate>Tue, 10 Feb 2015 22:21:12 +0800</pubDate><description><![CDATA[Given an unsorted integer array, find the first missing positive integer.

For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.

Your algorithm should run in O(n) time and uses constant]]></description><category></category></item><item><title><![CDATA[[Leetcode]Add Binary]]></title><link>https://blog.youkuaiyun.com/NoooName/article/details/43703509</link><guid>https://blog.youkuaiyun.com/NoooName/article/details/43703509</guid><author>NoooName</author><pubDate>Tue, 10 Feb 2015 15:17:09 +0800</pubDate><description><![CDATA[Given two binary strings, return their sum (also a binary string).

For example,
a = "11"
b = "1"

Return "100".
两个二进制数相加~ 做法和Add Two Numbers类似~从低位开始，一直相加并且维护进位~时间复杂度为O(max(m, n))~
细节注意点：用list]]></description><category></category></item></channel></rss>