继续开始刷题
疫情期间,没有合理安排工作和私人时间,在家效率也没有在公司那么高。
复工了,准备继续开始刷题了,加油:-)
疫情期间,没有合理安排工作和私人时间,在家效率也没有在公司那么高。
复工了,准备继续开始刷题了,加油:-)
给定一个数值含有0和1的数组A,考虑N_i为数组A[0]-A[i]的子数组的值构成的一个二进制数字(数组从低到高分别为二进制的高位到低位)。
返回一个包含boolean值的list结果answer,如果N_i的结果能被5整除,那么answer[i]为true。
在一个歌单列表中,第i首歌有time[i]秒。
返回在这个歌单中,有多少对歌曲,他们的秒数之和能被60整数。也就是说,我们希望在数组time中索引i<j,并且(time[i]+time[j])%60==0。
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]