Last Moment Before All Ants Fall Out of a Plank LeetCode solution in JavaScript

1
var getLastMoment = function (n, left, right) {
2
const maxLeft = Math.max(...left);
3
const minRight = Math.min(...right);
4

5
return Math.max(n - minRight, maxLeft);
6
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0