← AlgoMindset 75

Maximum Subsequence Score

Medium🎙 Interview me on this

🧠 Before you code — what pattern fits?

You are given two arrays nums1 and nums2 of length n, and an integer k. Choose k indices; the score is (sum of chosen nums1 values) × (minimum of chosen nums2 values). Return the maximum possible score.

(nums1=[1,3,3,2], nums2=[2,1,3,4], k=3) → 12

🎬 Video explanation · NeetCodeIO

Your solution runs against 2 unit tests, including edge and large-value cases.

Loading...

Test console · 2 unit tests

Submit your code to run it against all 2 unit tests. Results appear here.

JavaScript, TypeScript & Python run sandboxed in your browser; other languages run on the execution server. Your code is saved locally as you type.