int minIndex(int v[], int first, int last){if(first==last){return first;}int tempA = min(v,first,(first+last)/2);int tempB = min(v,(first+last)/2,last);if(tempA<tempB) return tempA;else return tempB;}