largest product

This Question Was Asked By Facebook

Given a list of integers, return the largest product that can be made by multiplying any three integers.

Write a function solve that have the following parameter(s):
1.) arr = an array of integer

Example
Input:
[-10, -10, 5, 2]
Output:
500

Explanation
An array is given [-10, -10, 5, 2]. It will return 500, since that's, -10 -10 5.

Example
Input:
[8, -1, 37, 9, 100,]
Output:
33300

Explanation
An array is given [8, -1, 37, 9, 100,]. It will return 33300, since that's,
37 9 100.

Constraints
• The length of an array should be greater than 0 and less than 100.
• The elements of an array should be greater than -1000 and less than 1000.