This is correct for this algo but it is taking a lot of time.
Please tell any other optimized approach that you can think after seeing the Question.
This is correct for this algo but it is taking a lot of time
Hey @cbcao263
Optimized ur code and its better than 99 % now : https://ide.codingblocks.com/s/346317
I don’t think there is any other better approach
Okayyy
Code is really amazing.
And Sir ek condition smjhaado plz
if(m[s2[i]]==0||m[s2[i]]==f[s2[i]])
This One.
Consider it as A||B
then A means if not present in our main string
And B means if count of current string for that char = count of main string for that char , then also we return false because we are going to take extra character
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.