HackerRank - Dynamic Programming: Stock Maximize