So this is the pseudo code I came up with but the run time is very slow. Is there a way to write this code to get it in terms of O(n)?
First for loop (starts at 0) grabs the first value of the array and the second for loop is nested inside the first for loop (starts at j =i+1). The second for loop runs through and checks if the second value times the first value is equivalent to x, if not, then there are no pairs.
How would I write this to get the run time down to O(n)?