Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Array help

$
0
0
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...

Viewing all articles
Browse latest Browse all 51036

Trending Articles