Most points for clearing a row
A row holds the integers values. You remove its items one at a time, in any order, until the row is empty. Removing an item with value v scores left × v × right, where left and right are the values of its current neighbors: removed items are gone, so the row closes up, and a missing neighbor past either end counts as 1. Return the highest possible total score.
The row has 0 to 60 items, each from 0 to 100. Aim for O(n³) time.
Besides the tests, one large input (17 items) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
most_points([2,4,3])→33most_points([6,1,2,9])→183most_points([5])→5