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?