HarshCasper/NeoAlgo-Docs

Wine Selling Problem

Closed this issue ยท 0 comments

๐Ÿ“š Documentation

Given n wines in a row, with integers denoting the cost of each wine respectively.
Each year you can sell the first or the last wine in the row.
Let the initial profits from the wines be P1, P2, P3โ€ฆPn.
In the Yth year, the profit from the ith wine will be Y*P[i].
The goal is to calculate the maximum profit that can be earned by selling all the wines.

Have you read the Contributing Guidelines on Pull Requests?

Yes