get the index of largest gap from value array, array must be sorted first
int find_largest_gap( const vector & vValue )
index of largest gap, return -1 if size of array less than 2.
EX1
void find_large_gap_ex1() { vector vSorted = {0, 20, 50, 100, 300, 330}; int nIndex = find_largest_gap(vSorted); ASSERT(3 == nIndex); }
EX2
void find_large_gap_ex2() { vector vv = {-100, 30, -80, -50, 90}; vv.Sort(); int nIndex = find_largest_gap(vv); ASSERT(2 == nIndex); }
origin.h