Hello,
I'm getting time limit exceeded on this problem; 710F - Операции над множеством строк
Any idea how to tweak my solution to avoid this quadratic runtime in method "count". I reviwed others solutions, and they are all quadratic, but why my implementation is just slower?
The nested for loop gives an asymptotic runtime of O(L^2) where L is input string length.
My solution; 20459110
Any hints would be truly appreciated!
Thanks in advance!