This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given an array_of_ints, find the highest_product you can get from three of the integers. | |
# The input array_of_ints will always have at least three integers. | |
def highest_product(arr) | |
highest = arr[0] | |
lowest = arr[0] | |
# This just set the absolute baseline to work with. | |
# Grab the first (n) elements and multiply them. Then as we walk through continue to look for | |
# higher numbers |