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

Leetcode习题解析

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

关注
24 已关注
93篇博文
  • Range Sum Query - Immutable

    303. Range Sum Query - Immutable 题目描述 Given an integer array nums, find the sum of the elements ...

    2018-09-08 00:46
    33
  • Min Cost Climbing Stairs

    Min Cost Climbing Stairs 题目 On a staircase, the i-th step has some non-negative cost cost[i] ass...

    2018-09-04 09:25
    25
  • LeetCode题解-AddTwoNumbers

    LeetCode题解-AddTwoNumbers 问题描述 You are given two non-empty linked lists representing two non-nega...

    2018-06-08 19:37
    79
  • LeetCode题解-Two Sum

    LeetCode题解 - Two Sum 问题描述 Given an array of integers, return indices of the two numbers such tha...

    2018-06-08 00:37
    77
  • 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
    2087
  • Leetcode: Sqrt(x)

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

    2015-09-04 12:16
    994
  • 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
    957
  • 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
    1166
  • Leetcode: Triangle

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

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

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

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

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

    2015-04-20 23:33
    873
  • 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
    1155
  • 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
    614
  • 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
    579
  • 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
    562
  • 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
    1062
  • LeetCode: Anagrams

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

    2014-11-15 10:55
    816
  • 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
    757
  • 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
    535
  • 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
    782
img博客搬家
img撰写博客
img发布 Chat
img专家申请
img意见反馈
img返回顶部