4 ms·> This should reduce time complexity to O( (n - 1)^2 ) O((n-1)^2) = O(n^2).by q-big 5y ago> This should reduce time complexity to O( (n - 1)^2 ) O((n-1)^2) = O(n^2).