Not useful operations

if I have an array {ab,ab,cd,ef,gh}
at i = 1, we will get “abab” and “ab” for the next iteration but we know “abab…” cannot be our answer but here until we reach the end of the vector we cannot eliminate “abab…”
we can optimize here.

Hi @nikhilsrivastavaone do you have any doubt or are you suggesting a modification in the solution?

I am suggesting that we can do in this way too :slight_smile:

@nikhilsrivastavaone thank you for your suggestion! You can mail it on [email protected] so it reaches the team :slight_smile:

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.

Ok, :smiley:Thank you.