Divide the array into two equal length subarrays and recursively find the largest among the two
vector < int > compared1 = findLargest ( beg , ( beg + end ) / 2 , arr , n ) ; vector < int > compared2 = findLargest ( ( beg + end ) / 2 + 1 , end , arr , n ) ; if ( compared1 [ 1 ] > compared2 [ 1 ] ) { int k = compared1 [ 0 ] + 1 ;