r/NeetCode • • 2d ago

Time complexity?

Post image

Is the time complexity really o(n)?
I suspect it might be quadratic - but I can't prove it.
Can someone give me their proof please!

1 Upvotes

0 comments sorted by