add sol via divide and conquer