Search
⌘K

Leetcode 3290. Maximum Multiplication Score

Given four fixed weights a[0..3] and an array b, pick indices i0<i1<i2<i3 to maximize the weighted sum a[0]*b[i0]+a[1]*b[i1]+a[2]*b[i2]+a[3]*b[i3]; the core challenge is choosing four ordered positions in b (considering positive/negative weight effects) which is typically solved by dynamic programming that tracks best scores after each selection.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.