Return the largest product of 2 numbers that is a multiple of 9 in O(n)
The solution will be of one of two forms : 


  a * b where a is divisible by 9


or


  c * d where c is divisible by 3 and d is divisible by 3


To find the maximum of the first from we need to find the greatest number divisible by 9, and combine it with the greatest number, or the second greatest if the one divisible by 9 is the greatest. 

To find the maximum of the second form we need to find the two greatest numbers divisible by 3.

So you can loop all numbers and determine for each number if it is a better candidate for a,b, c or d.

After that loop, calculate a*b and c*d, and the greatest of both wins, and is the result.

This algorithm results in \$O(n)\$ complexity.