You are given two hens and grains, representing the initial positions of hens and grains along a line.
In each second, any hen can move
Return the minimum time in seconds needed for the hens to eat all the grains.
Constraints:
hens.length, grains.length
hens[i], grains[j]
You are given two hens and grains, representing the initial positions of hens and grains along a line.
In each second, any hen can move
Return the minimum time in seconds needed for the hens to eat all the grains.
Constraints:
hens.length, grains.length
hens[i], grains[j]