You are viewing a single comment's thread. Return to all comments →
// Simple Dimple var minList = new List<int>(); for(int i=0;i<a.Count-1;i++) { int cnt =1; for(int j=i+1;j<a.Count;j++) { if(a[i]!= a[j]) { cnt++; }else{ minList.Add(cnt); } } } if(minList.Count!=0) { return minList.Min(); } else{ return -1; }
Minimum Distances
You are viewing a single comment's thread. Return to all comments →