1752-check-if-array-is-sorted-and-rotated

DevGod
Vtuber
/** * @param {number[]} nums * @return {boolean} */var check = function(nums) { return [...nums,...nums].join(",").includes(_.sortBy(nums).join(","));};
/** * @param {number[]} nums * @return {boolean} */var check = function(nums) { return [...nums,...nums].join(",").includes(_.sortBy(nums).join(","));};