Skip to content

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

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