题目描述:
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 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 ...
LeetCode 854. K-Similar Strings
Strings A
and B
are K
-similar (for some non-negative integer K
) if we can swap the positions of two letters in A
exactly K
times so that the resulting string equals B
.
Given two ...
In an exam room, there are N
seats in a single row, numbered 0, 1, 2, ..., N-1
.
When a student enters the room, they must sit in the seat that maximizes the distance to the ...
N
cars are going to the same destination along a one lane road. The destination is target
miles away.
Each car i
has a constant speed speed[i]
(in miles per hour), and ...