### Leetcode习题解析

Leetcode解题报告！对于Leetcode上面的算法习题进行解析，给出解题思路以及参考代码！《Leetcode习题解析》和网友们共同学习进步！

20 已关注
89篇博文
• #### Leetcode: Single Number III

题目： Given an array of numbers nums, in which exactly two elements appear only once and all the ...

2015-10-17 11:50
1487
• #### Leetcode: Sqrt(x)

Implement int sqrt(int x).Compute and return the square root of x.依然二分法….这道题虽然简单，但是有一些细节需要注意，我是提交了好几...

2015-09-04 12:16
892
• #### Leetcode: Pow(x, n)

Implement pow(x, n).实现乘幂运算，给出的提示是Bianry Search。其实就是利用公式xn=xn/2∗xn/2∗xn%2x^n = x^{n/2} * x^{n/2} * x^...

2015-09-04 11:43
866
• #### Leetcode: Clone Graph

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ’s ...

2015-09-03 15:25
1090
• #### Leetcode: Triangle

最近都在复习英语，看见看得头都大了，而且阅读越做分数越低！换个环境，做做Leetcode试题！ 题目： Given a triangle, find the minimum path su...

2015-06-07 11:37
938
• #### Leetcode: Reverse Bits

题目： Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented...

2015-04-21 10:55
1343
• #### Leetcode: Subsets

题目： Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset mus...

2015-04-20 23:33
800
• #### Leetcode: House Robber

题目： You are a professional robber planning to rob houses along a street. Each house has a certain a...

2015-04-20 18:18
1081
• #### Leetcode: SingleNumber I

题目： Given an array of integers, every element appears twice except for one. Find that single one. Yo...

2014-10-21 15:29
555
• #### Leetcode: Length of Last Word

问题： Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return t...

2014-10-22 00:09
519
• #### Leetcode: SingleNumber II

题目： Given an array of integers, every element appears three times except for one. Find that single o...

2014-10-21 15:51
484
• #### LeetCode: Combinations

Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For exampl...

2014-10-26 09:56
983
• #### LeetCode: Anagrams

问题： Given an array of strings, return all groups of strings that are anagrams. Note: All inputs w...

2014-11-15 10:55
747
• #### LeetCode: Maximum Depth of Binary Tree

题目如下： Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along t...

2015-01-09 09:39
696
• #### Leetcode: Same Tree

题目： Given two binary trees, write a function to check if they are equal or not. Two binary trees ar...

2015-01-20 00:32
479
• #### Leetcode: Excel Sheet Column Number

题目： Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet,...

2015-01-20 23:56
716
• #### Leetcode: Excel Sheet Column Title

问题： Given a positive integer, return its corresponding column title as appear in an Excel sheet. Fo...

2015-01-21 00:19
561
• #### Leetcode: Remove Duplicates from Sorted List

问题： Given a sorted linked list, delete all duplicates such that each element appear only once. For ...

2015-01-23 00:35
519
• #### Leetcode: String to Integer (atoi)

题目： Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input c...

2015-02-04 20:07
582
• #### Leetcode: Rotate Array

题目：Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the arr...

2015-03-04 20:29
638