divide and conquer methodology finding maximum and minimum