as an algorithm design technique , the divide-and-conquer principle requires dividing the problem into two smaller subproblems , solving each of them recursively , and then melding the two partial solutions into one solution to the full problem .