You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Approach:First,sorted the array and took a window of size m,starting from 0th index and then kept shifting the window by 1 unit to find the minimum difference.
class Solution {
public int findMinDiff(ArrayList<Integer> arr, int m) {