2561. Rearranging Fruits
941. Valid Mountain Array
440. K-th Smallest in Lexicographical Order
440. K-th Smallest in Lexicographical Order
Description
Given two integers n
and k
, return the k^th
lexicographically smallest integer in the range [1, n]
.
616. Add Bold Tag in String
2931. Maximum Spending After Buying Items
2931. Maximum Spending After Buying Items
Description
You are given a 0-indexed m * n
integer matrix values
, representing the values of m * n
different items in m
different shops. Each shop has n
items where the j^th
item in the i^th
shop has a value of values[i][j]
. Additionally, the items in the i^th
shop are sorted in non-increasing order of value. That is, values[i][j] >= values[i][j + 1]
for all 0 <= j < n - 1
.
399. Evaluate Division
Description
You are given an array of variable pairs equations
and an array of real numbers values
, where equations[i] = [A<sub>i</sub>, B<sub>i</sub>]
and values[i]
represent the equation A<sub>i</sub> / B<sub>i</sub> = values[i]
. Each A<sub>i</sub>
or B<sub>i</sub>
is a string that represents a single variable.
135. Candy
3389. Minimum Operations to Make Character Frequencies Equal
1552. Magnetic Force Between Two Balls
1552. Magnetic Force Between Two Balls
Description
In the universe Earth C-137, Rick discovered a special form of magnetic force between two balls if they are put in his new invented basket. Rick has n
empty baskets, the i^th
basket is at position[i]
, Morty has m
balls and needs to distribute the balls into the baskets such that the minimum magnetic force between any two balls is maximum .