Rick wants a faster way to get the product of the largest pair in an array. Your task is to create a performant solution to find the product of the largest two integers in a unique array of positive numbers. All inputs will be valid.
Passing [2, 6, 3] should return 18, the product of [6, 3].

```Disclaimer: Mr. Roll will only accept solutions that are faster than his, which has a running time O(nlogn).``` 

```python
max_product([2, 1, 5, 0, 4, 3])              # => 20
max_product([7, 8, 9])                       # => 72
max_product([33, 231, 454, 11, 9, 99, 57])   # => 104874
```

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Sorting

Data structures

Starter code: def max_product(a):
	

Solutions:
import heapq

def max_product(a):
	x = heapq.nlargest(2, a)
	return x[0] * x[1]


def max_product(a):
	first_max = 0
	second_max = 0
	for x in a:
		if x > first_max:
			second_max = first_max
			first_max = x
		elif x > second_max:
			second_max = x
	return first_max * second_max


from heapq import nlargest

def max_product(a):
	(x, y) = nlargest(2, a)
	return x * y


def max_product(a):
	m1 = max(a)
	a.remove(m1)
	m2 = max(a)
	return m1 * m2


def max_product(a):
	m = a.pop(a.index(max(a)))
	return max(a) * m


import heapq
from functools import reduce
from operator import mul

def max_product(a):
	return reduce(mul, heapq.nlargest(2, a))


def max_product(a):
	b = list(a)
	max_number = max(b)
	b.remove(max_number)
	second_number = max(b)
	return max_number * second_number


from heapq import nlargest
from operator import mul

def max_product(a):
	return mul(*nlargest(2, a))


import heapq

def max_product(a):
	(first, second) = heapq.nlargest(2, a)
	return first * second