divide and conquer algorithm examples with solutions