Solve InterviewCake's highest-product-of-3

Write a function that returns the highest product of three integers within a
list of integers. This solution uses a greedy algorithm that solves for the
answer in linear time. The space complexity is constant.
This commit is contained in:
William Carroll 2020-03-01 21:30:25 +00:00
parent dff621922c
commit b4689761d9
2 changed files with 82 additions and 1 deletions

View file

@ -11,7 +11,7 @@
** DONE Top Scores
* Greedy Algorithms
** DONE Apple Stocks
** TODO Highest Product of 3
** DONE Highest Product of 3
** TODO Product of All Other Numbers
** TODO Cafe Order Checker
** TODO In-Place Shuffle