class Solution { ArrayList countDistinct(int k, int arr[]) { // code here ArrayList al=new ArrayList<>(); for(int i=0;i<=arr.length-k;i++){ HashSet hs=new HashSet<>(); for(int j=i;j countDistinct(int k, int arr[]) { // code here int start=0; int end=0; HashMap hm=new HashMap<>(); ArrayList al=new ArrayList<>(); int dist=0; int x=0; for(int i=0;i