题目描述:
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 ...
最后更新于 .
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 ...
最后更新于 .
LeetCode 847. Shortest Path Visiting All Nodes
An undirected, connected graph of N nodes (labeled 0, 1, 2, ..., N-1
) is given as graph
.
graph.length = N
, and j != i
is in the list graph[i]
exactly once, if and ...
最后更新于 .
LeetCode 845. Longest Mountain in Array
Let's call any (contiguous) subarray B (of A) a mountain if the following properties hold:
B.length >= 3
0 < i < B.length - 1
such that B[0] < ...
最后更新于 .
LeetCode 846. Hand of Straights
Alice has a hand of cards, given as an array of integers.
Now she wants to rearrange the cards into groups so that each group is size W, and consists of W consecutive cards ...