Algorithm Highest / Max Product
Algorithm that returns the highest product between three numbers of a given array of integers.
I have developed two approaches which take time and space complexity into account.
Approach 1
- Time Complexity: O(n)
- Space Complexity: O(n)
Approach 2
- Time Complexity: O(n + k)
- Space Complexity: O(k)