题目

Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (from most-significant-bit to least-significant-bit.)

Return a list of booleans answer, where answer[i] is true if and only if N_i is divisible by 5.

- 查看完整题目和思路 -

- 查看完整题目和思路 -

题目

For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For example, if X = 1231, then the array form is [1,2,3,1].

Given the array-form A of a non-negative integer X, return the array-form of the integer X+K.

- 查看完整题目和思路 -

题目

Given an array A of integers, return true if and only if it is a valid mountain array.

Recall that A is a mountain array if and only if:

``A.length >= 3``

There exists some i with `0 < i < A.length - 1` such that:

``````A[0] < A[1] < ... A[i-1] < A[i]
A[i] > A[i+1] > ... > A[A.length - 1]``````

- 查看完整题目和思路 -

[todo] 914. X of a Kind in a Deck of Cards

In a deck of cards, each card has an integer written on it.

Return true if and only if you can choose X >= 2 such that it is possible to split the entire deck into 1 or more groups of cards, where:

Each group has exactly X cards.
All the cards in each group have the same integer.

- 查看完整题目和思路 -