博客专栏  >  编程语言   >  Leetcode题目解析

Leetcode题目解析

包含Leetcode题目源代码、解析,欢迎大家一起讨论

关注
2 已关注
49篇博文
  • 119. Pascal's Triangle II

    119. Pascal’s Triangle II题目Given an index k, return the kth row of the Pascal’s triangle.For example...

    2017-06-03 13:37
    123
  • 26. Remove Duplicates from Sorted Array

    26. Remove Duplicates from Sorted Array题目Given a sorted array, remove the duplicates in place such t...

    2017-06-02 20:49
    100
  • 27. Remove Element

    27. Remove Element题目Given an array and a value, remove all instances of that value in place and retu...

    2017-06-02 20:50
    113
  • 35. Search Insert Position

    35. Search Insert Position题目Given a sorted array and a target value, return the index if the target ...

    2017-06-02 20:54
    110
  • 66. Plus One

    66. Plus One题目Given a non-negative integer represented as a non-empty array of digits, plus one to t...

    2017-06-02 17:25
    183
  • 121. Best Time to Buy and Sell Stock

    121. Best Time to Buy and Sell Stock题目Say you have an array for which the ith element is the price o...

    2017-06-02 17:20
    148
  • 219. Contains Duplicate II

    219 contains duplicate ii题目Given an array of integers and an integer k, find out whether there are t...

    2017-05-28 13:28
    164
  • 448. Find All Numbers Disappeared in an Array

    448. Find All Numbers Disappeared in an Array题目Given an array of integers where 1 ≤ a[i] ≤ n (n = si...

    2017-06-02 20:51
    104
  • 485. Max Consecutive Ones

    485. Max Consecutive Ones题目Given a binary array, find the maximum number of consecutive 1s in this a...

    2017-06-02 20:53
    99
  • 532. K-diff Pairs in an Array

    532. K-diff Pairs in an Array题目Given an array of integers and an integer k, you need to find the num...

    2017-06-02 17:30
    157
  • 118. Pascal's Triangle

    118. Pascal’s Triangle题目Given numRows, generate the first numRows of Pascal’s triangle.For example, ...

    2017-06-03 11:10
    122
  • 561. Array Partition I

    561. Array Partition I题目Given an array of 2n integers, your task is to group these integers into n p...

    2017-06-05 20:32
    138
  • 88. Merge Sorted Array

    88. Merge Sorted Array题目Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as o...

    2017-06-06 15:18
    124
  • 566. Reshape the Matrix

    122. Best Time to Buy and Sell Stock II题目In MATLAB, there is a very useful function called ‘reshape’...

    2017-06-02 20:57
    322
  • 167. Two Sum II - Input array is sorted

    167. Two Sum II - Input array is sorted题目Given an array of integers that is already sorted in ascend...

    2017-06-06 14:38
    87
  • 169. Majority Element

    169. Majority Element题目Given an array of size n, find the majority element. The majority element is ...

    2017-06-09 08:59
    110
  • 189. Rotate Array

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

    2017-06-09 09:04
    121
  • 551. Student Attendance Record I

    551. Student Attendance Record I题目You are given a string representing an attendance record for a stu...

    2017-06-09 10:43
    365
  • 537. Complex Number Multiplication

    537. Complex Number Multiplication1、题目 Given two strings representing two complex numbers.

    2017-06-09 11:14
    247
  • 609. Find Duplicate File in System

    609. Find Duplicate File in System题目Given a list of directory info including directory path, and all...

    2017-06-11 11:33
    439
img博客搬家
img撰写博客
img发布 Chat
img专家申请
img意见反馈
img返回顶部