Yes, (N^2)/2 is the same time complexity as N^2. Time complexity analysis looks at the shape of the scaling law, not additive or multiplicative constants. Helpful explainer:
1 Like
Yes, (N^2)/2 is the same time complexity as N^2. Time complexity analysis looks at the shape of the scaling law, not additive or multiplicative constants. Helpful explainer: