### LeetCode

0 已关注
75篇博文
• #### Leetcode#665. Non-decreasing Array(非递减数组)

题目 Given an array with n integers, your task is to check if it could become non-decreasing by modif...

昨天 21:52
22
• #### Leetcode#747. Largest Number At Least Twice of Others

题目 In a given integer array nums, there is always exactly one largest element. Find whether the la...

昨天 22:02
20
• #### Leetcode#724. Find Pivot Index

题目 Given an array of integers nums, write a method that returns the “pivot” index of this array. W...

昨天 22:07
24
• #### Leetcode#485. Max Consecutive Ones

题目 Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: In...

2018-02-07 20:11
13
• #### Leetcode#605. Can Place Flowers

题目 Suppose you have a long flowerbed in which some of the plots are planted and some are not. Howev...

2018-02-07 21:34
18
• #### Leetcode#189. Rotate Array（翻转数组）

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

2018-02-08 14:44
21
• #### Leetcode#219. Contains Duplicate II（包含副本II）

题目 Given an array of integers and an integer k, find out whether there are two distinct indices i a...

2018-02-08 18:30
15
• #### Leetcode#532. K-diff Pairs in an Array(k差异对）

题目 Given an array of integers and an integer k, you need to find the number of unique k-diff pairs ...

2018-02-09 16:59
20
• #### Leetcode#566. Reshape the Matrix(重塑矩阵)

题目 In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a n...

2018-02-09 17:31
18
• #### Leetcode#581. Shortest Unsorted Continuous Subarray（最短未排连续子数组）

题目 Given an integer array, you need to find one continuous subarray that if you only sort this suba...

2018-02-09 18:13
18
• #### Leetcode#M628.aximum Product of Three Numbers(三个数最大积)

题目 Given an integer array, find three numbers whose product is maximum and output the maximum produ...

2018-02-09 22:22
15
• #### Leetcode#643. Maximum Average Subarray I(连续子数组的最大平均值）

题目 Given an array consisting of n integers, find the contiguous subarray of given length k that has...

2018-02-10 14:34
23
• #### Leetcode#674. Longest Continuous Increasing Subsequence（最长连续递增子序列的长度)）

题目 Given an unsorted array of integers, find the length of longest continuous increasing subsequenc...

前天 21:53
100
• #### Leetcode#167. Two Sum II - Input array is sorted（双向查找））

题目Given an array of integers that is already sorted in ascending order, find two numbers such that t...

2018-02-07 15:02
24
• #### Leetcode#217. Contains Duplicate(包含副本)

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

2018-02-07 15:35
20
• #### Leetcode#283. Move Zeroes

题目 Given an array nums, write a function to move all 0’s to the end of it while maintaining the rel...

2018-02-07 19:21
31
• #### Leetcode#448. Find All Numbers Disappeared in an Array

题目 Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice an...

2018-02-07 19:29
37
• #### Leetcode#766. Toeplitz Matrix （托普利兹矩阵）

题目 A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now ...

2018-02-07 19:40
58
• #### Leetcode#414. Third Maximum Number

题目 Given a non-empty array of integers, return the third maximum number in this array. If it does n...

2018-02-07 19:54
30
• #### Leetcode#231. Power of Two(2次幂）

题目 Given an integer, write a function to determine if it is a power of two. 题意 给你一个整数，判读是否是2的幂次方...

2018-01-29 13:00
44