int arr[] = {10, 10, 1, 3};
Assumptions: Assume every int is positive. Assume array contains at least 3 ints
Find the highest product you can get from three of the integers in the above array. We should return 300 (which we get by taking 10 ∗ 10 ∗ 3).
I want to solve this using brute force method. Basically, I want to multiply each integer by each other integer, and then multiply that product by each other other integer. Can anyone show me how this can be done using nested 3 loops because I want to learn how it's done using brute force first before trying the optimized approach.
Thanks.