Complexity O(2n) vs O(n)

I was solving a problems. Come out with 2 solutions.
Suprisingly, the solution with O(2n) complexity run much faster (24ms) than the one with O(n) complexity (36ms).

Theoriertically, O(n) should out performance to O(2n) right?

Comments (2)