Not able to think how it will be done with D&C

Just want the approach of how it will be done by D&C

hello @divyansh0003

sort ur array .
then iterate from start of the array.
for each index i check whether M-a[i] is present in the right side of the index i or not .if it is then this can be ur answer . ( use binary search to look for M-a[i] ).

overall time complexity of this approach will be
n*log(n)