Recursive method for the above question

can someone please post this code in a recursive format, I feel it can be solved recursively but I just can’t figure it out. I have already solved it without using recursion.

@jayasmit98 hey it cant be done using recursion,normal sorting and two pointer or hashing will bne used,we cant divide it in shorter problem for recursion ,hence try solving it with sorting and two pointer.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.