Quote:
|
Run and debug my code to seee what it does.
|
To make this clear, here is a small example:
Code:
const int numbers[] = {1, 2, 4, 3, 6, 5, 14};
There will be 6 odd pairs ({1,3};{3,1};{1,5}{5,1};{3,5};{5,3}) or 3! since theres 3 odd numbers in the vector.
(Oops was that too much of a hint...)
Anyway I think people get the idear, the task here is to make a way of looping through the array in O(N) time instead of the O(N^2) time which Valmonts solution does.