The example 2 is wrong.
4^2 + 2^2 is not 18, it is 20.
Thank you for pointing out. We’ve fixed it.
Can someone explain how the time complexity is O(n) ?
The example 2 is wrong.
4^2 + 2^2 is not 18, it is 20.
Thank you for pointing out. We’ve fixed it.
Can someone explain how the time complexity is O(n) ?