Optimize version of solution

Here in the recursive version why we dont first check that the current string contains duplicate character or not . In this way we will make less recursive calls.

You mean to say that first you want to remove all those strings which have duplicate in them and after that the set of strings you have which don’t have duplicates in them you will do recursive calls in them? Is this what you wanna say?

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.