### LeetCode & LintCode 题解

48 已关注
215篇博文
• #### LeetCode(617) Merge Two Binary Trees

题目 Given two binary trees and imagine that when you put one of them to cover the other, some node...

2017-09-10 16:30
826
• #### LeetCode（87） Scramble String

题目 Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty ...

2016-08-31 17:31
508
• #### LintCode （192）通配符匹配

题目 判断两个可能包含通配符“？”和“*”的字符串是否匹配。匹配规则如下： '?' 可以匹配任何单个字符。 '*' 可以匹配任意字符串（包括空字符串）。 两个串完全匹配才算匹配成功。 函数接口...

2016-09-02 21:16
873
• #### LeetCode(461) Hamming Distance

题目 The Hamming distance between two integers is the number of positions at which the correspond...

2017-09-03 14:24
513
• #### LeetCode（657）Judge Route Circle

题目 Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this r...

2017-09-03 14:43
633
• #### LeetCode（191）Number of 1 Bits

题目 Write a function that takes an unsigned integer and returns the number of ’1' bits it has (a...

2016-08-29 21:55
820
• #### LeetCode（389） Find the Difference

题目 Given two strings s and t which consist of only lowercase letters. String t is generated ...

2016-08-29 20:28
1684
• #### LeetCode（383）Ransom Note

题目 Given  an  arbitrary  ransom  note  string  and  another  string  containing  letters from  ...

2016-08-29 20:38
725
• #### LeetCode（350）Intersection of Two Arrays II

题目 Given two arrays, write a function to compute their intersection. Example: Given nums1 =...

2016-08-29 21:21
771
• #### LeetCode（231） Power of Two

题目 Given an integer, write a function to determine if it is a power of two. 分析 判断给定整数是否为2的整...

2016-08-29 21:29
670
• #### LeetCode（326） Power of Three

题目 Given an integer, write a function to determine if it is a power of three. 分析 本题判断给定...

2016-08-29 21:50
768
• #### LeetCode（179） Largest Number

题目 Given a list of non negative integers, arrange them such that they form the largest number. ...

2016-08-25 21:22
855
• #### LeetCode（349）Intersection of Two Arrays

题目 Given two arrays, write a function to compute their intersection. Example: Given nums1 =...

2016-08-25 20:26
733
• #### LeetCode（41）First Missing Positive

题目Given an unsorted integer array, find the first missing positive integer.For example, Given [1,2,...

2015-08-26 17:31
596
• #### LeetCode（217）Contains Duplicate

题目Given an array of integers, find if the array contains any duplicates. Your function should return...

2015-12-03 12:46
435
• #### LeetCode（371） Sum of Two Integers

题目 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -....

2016-08-24 21:28
694
• #### LeetCode（386）Lexicographical Numbers

题目 Given an integer n, return 1 - n in lexicographical order. For example, given 13, return:...

2016-08-23 22:02
1997
• #### LeetCode（344） Reverse String

题目 Write a function that takes a string as input and returns the string reversed. Example: ...

2016-08-15 22:14
592
• #### LeetCode（387）First Unique Character in a String

题目 Given a string, find the first non-repeating character in it and return it's index. If it do...

2016-08-23 20:34
1842
• #### LeetCode(85) Maximal Rectangle

题目 Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing ...

2016-08-14 20:54
480