6890. Find the Value of the Partition || Leetcode solution

preview_player
Показать описание
code in the comment section...
Рекомендации по теме
Комментарии
Автор

class Solution {
public:
int nums) {
sort(nums.begin(), nums.end());

int ans = INT_MAX;
for(int i = 1;i<nums.size();i++){
ans = min(ans, nums[i]-nums[i-1]);
}

return ans;
}
};

ahmedberuny-coding
join shbcf.ru