Hello,
I am needing help with sorted arrays and the time complexity of O(n).
The user has to put in 20 integers in a sorted array and a target number in which the program will find all the possible pairs that will equal to the target number. The time complexity has to be in O(n).
I don't really know where to start and I looked online and haven't found anything to help.
The only thing I was able to do is allow the user to input the integers, but beyond that I'm stuck...
I am needing help with sorted arrays and the time complexity of O(n).
The user has to put in 20 integers in a sorted array and a target number in which the program will find all the possible pairs that will equal to the target number. The time complexity has to be in O(n).
I don't really know where to start and I looked online and haven't found anything to help.
The only thing I was able to do is allow the user to input the integers, but beyond that I'm stuck...