three pointers, AC, O(n)/O(1)