In a deck of cards, each card has an integer written on it.
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 array that satisfies this condition.
An array is monotonic if it is either monotone increasing or monotone decreasing.
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.
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.
In a row of seats, 1 represents a person sitting in that seat, and 0 represents that the seat is empty. There is at least one empty seat, and at least one person sitting.
A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum.
Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.
In a string of lowercase letters, these letters form consecutive groups of the same character.For example, a string like S = "abbxxxxzyy" has the groups "a", "bb", "xxxx", "z" and "yy".
S = "abbxxxxzyy"
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.
M x N
Do you like me?
16 • 0 • 2月前
38 • 0 • 2月前
14 • 0 • 1月前
「LeetCode刷题（Easy Rank）：1.Two Sum」
32 • 0 • 1月前
「LeetCode刷题（Easy Rank）：53. Maximum Subarray」
21 • 0 • 1月前