For this lesson, whys is the complexity O(n^3)? I understand that sliding window takes O(n) and we have another for loop nested that creates the subarrays. Therefore, shouldn’t total runtime be O(n^2)? The lesson doesn’t explain clearly why O(n^3).
Type your question above this line.