You are viewing a single comment's thread. Return to all comments →
Formally g(n) could be g(n)=2*n. Therefore it's correct to say O(2*n). And we all know, O(2*n)=O(n). Both is correct.
Seems like cookies are disabled on this browser, please enable them to open this website
Candies
You are viewing a single comment's thread. Return to all comments →
Formally g(n) could be g(n)=2*n. Therefore it's correct to say O(2*n). And we all know, O(2*n)=O(n). Both is correct.