Why will be the time complexity be O (n^3) ?It should be O (n^2*k) where k is the window size.
Time complexity of brute force approach
Hi, did you mean O((n^2)k) or O(n^(2k))?
the first one i.e (n^2)*k
The time complexity is not even O(n^3)!!
It is just O(n).
It is possible, you might’ve asked on wrong video. I no, then tell me and I’ll explain how.
pls explain me the time complexity of the brute force approach whose optimised version is the sliding window technique that takes O(N) time