What is the greatest 3 by 2 product you can get with 2, 4, 7, 8, and 9, given less than a minute?
Implement maximize_product(digits) using each of the five distinct digits exactly once, with three digits forming one number and two digits forming the other. Return the greatest product as an integer. The input is a list of five distinct digits from 1 through 9.
def maximize_product(digits):