Given an array of integers `sequence` where each element has a corresponding weight in the `weights` array, find the maximum sum subsequence by selecting a subset of elements from `sequence`, considering their respective weights in `weights`. The subsequence does not need to be contiguous.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak