add a O(n) time solution