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:
parent
dff621922c
commit
b4689761d9
2 changed files with 82 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue