题目描述:
LeetCode 952. Largest Component Size by Common Factor
Given a non-empty array of unique positive integers A
, consider the following graph:
- There are
A.length
nodes, labelledA[0]
toA[A.length - 1];
- There is an edge between
A ...
LeetCode 952. Largest Component Size by Common Factor
Given a non-empty array of unique positive integers A
, consider the following graph:
A.length
nodes, labelled A[0]
to A[A.length - 1];
A ...
LeetCode 873. Length of Longest Fibonacci Subsequence
A sequence X_1, X_2, ..., X_n
is fibonacci-like if:
n >= 3
X_i + X_{i+1} = X_{i+2}
for all i + 2 <= n
Given a strictly increasing array A
of positive ...
LeetCode 875. Koko Eating Bananas
Koko loves to eat bananas. There are N
piles of bananas, the i
-th pile has piles[i]
bananas. The guards have gone and will come back in H
hours.
Koko can decide ...
LeetCode 871. Minimum Number of Refueling Stops
A car travels from a starting position to a destination which is target
miles east of the starting position.
Along the way, there are gas stations. Each station[i]
represents a ...
LeetCode 870. Advantage Shuffle
Given two arrays A
and B
of equal size, the advantage of A
with respect to B
is the number of indices i
for which A[i] > B[i]
.
Return any permutation of A ...