You are viewing a single comment's thread. Return to all comments →
int maxValue = 0, maxValueIndex = 0; for (int i = p; i <= q; i++) { int minValue = Math.Abs(arr[0] - i);`` for (int j = 1; j < arr.Count; j++) { minValue = Math.Min(minValue, Math.Abs(arr[j] - i)); } if (minValue > 0 && minValue > maxValue) { maxValue = minValue; maxValueIndex = i; } } return maxValueIndex;
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and MiniMax
You are viewing a single comment's thread. Return to all comments →