divide and conquer algorithm examples in c