What is the time complexity of finding all pairs with a given sum in a sorted array using two pointers?