0

Hello, how to optimize the code because it takes too much time

https://code.sololearn.com/ct8IP8yj6gl0/?ref=app I try to find out if it is possible to construct string b out of string a. If it is possible, output is true else false.

30th May 2022, 10:03 AM
TeaserCode
1 Respuesta
+ 2
your algorithm complexity is O(n²). this is why it takes too much time to run. Try this code. https://code.sololearn.com/cqkl4ySEJJIE I think this is much more simple
30th May 2022, 10:49 AM
Christian Fare T.
Christian Fare T. - avatar