divide and conquer algorithm examples java