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.
1 Antwort
+ 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