Given a list of chocolate, where the chocolate pieces on both ends can (like a doubly linked list) be picked and eaten, optimize the best way of picking the chocolate. But how does it differ the way you pick the chocolate pieces? Well, every chocolate piece has a tastiness-value to it (a positive number), and after every picked chocolate, the value of all the remaining chocolates multiply. So you want to pick the best chocolate last.
(Do note that the code is partially incomplete and will not accept some input)