![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCodeArray
weixin_40692977
这个作者很懒,什么都没留下…
展开
-
1.Two Sum
1.Two Sum 题目: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not ...原创 2018-09-25 21:47:43 · 63 阅读 · 0 评论 -
888. Fair Candy Swap
888. Fair Candy Swap Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is the size of the j-th bar of candy that Bob has. Since they ...原创 2018-09-28 17:19:28 · 94 阅读 · 0 评论 -
896. Monotonic Array
896. Monotonic Array 题目: An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i <= j, A[i] <= A[j]. An array A is monot...原创 2018-09-28 10:30:45 · 106 阅读 · 0 评论 -
566. Reshape the Matrix
566. Reshape the Matrix ##题目: In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data. You’re given a matr...原创 2018-09-28 09:57:57 · 57 阅读 · 0 评论 -
442. Find All Duplicates in an Array
442. Find All Duplicates in an Array 题目: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twice in thi...原创 2018-09-27 21:34:07 · 64 阅读 · 0 评论 -
766. Toeplitz Matrix
766. Toeplitz Matrix 题目: A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if the matrix is Toeplitz. Exampl...原创 2018-09-27 10:50:37 · 62 阅读 · 0 评论 -
867. Transpose Matrix
867. Transpose Matrix 题目: Given a matrix A, return the transpose of A. The transpose of a matrix is the matrix flipped over it’s main diagonal, switching the row and column indices of the matrix. Exam...原创 2018-09-27 09:51:56 · 162 阅读 · 0 评论 -
832. Flipping an Image
832. Flipping an Image 题目: Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally means that each row of the ima...原创 2018-09-26 10:50:21 · 68 阅读 · 0 评论 -
905. Sort Array By Parity
905. Sort Array By Parity 题目: Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may return any answer arra...原创 2018-09-26 09:54:16 · 81 阅读 · 0 评论 -
561. Array Partition I
561. Array Partition I 题目: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) for all i fro...原创 2018-09-26 09:26:42 · 56 阅读 · 0 评论 -
485. Max Consecutive Ones
485. Max Consecutive Ones 题目: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last thr...原创 2018-09-29 10:14:36 · 80 阅读 · 0 评论