博客专栏  >  综合   >  Leetcode习题解析

Leetcode习题解析

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

关注
17 已关注
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
    1420
  • Leetcode: Sqrt(x)

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

    2015-09-04 12:16
    843
  • 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
    811
  • 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
    1049
  • Leetcode: Triangle

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

    2015-06-07 11:37
    888
  • Leetcode: Reverse Bits

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

    2015-04-21 10:55
    1287
  • Leetcode: Subsets

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

    2015-04-20 23:33
    770
  • 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
    1049
  • 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
    524
  • 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
    480
  • 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
    444
  • 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
    936
  • LeetCode: Anagrams

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

    2014-11-15 10:55
    716
  • 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
    654
  • 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
    452
  • 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
    676
  • 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
    527
  • 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
    483
  • 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
    548
  • 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
    595

img博客搬家
img撰写博客
img发布 Chat
img专家申请
img意见反馈
img返回顶部