Complexity : O( N )